VirtualBox

source: vbox/trunk/src/libs/boost-1.37.0/boost/config/platform/linux.hpp@ 16204

Last change on this file since 16204 was 16204, checked in by vboxsync, 16 years ago

export the boost stuff required for Main

File size: 2.4 KB
Line 
1// (C) Copyright John Maddock 2001 - 2003.
2// (C) Copyright Jens Maurer 2001 - 2003.
3// Use, modification and distribution are subject to the
4// Boost Software License, Version 1.0. (See accompanying file
5// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6
7// See http://www.boost.org for most recent version.
8
9// linux specific config options:
10
11#define BOOST_PLATFORM "linux"
12
13// make sure we have __GLIBC_PREREQ if available at all
14#include <cstdlib>
15
16//
17// <stdint.h> added to glibc 2.1.1
18// We can only test for 2.1 though:
19//
20#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
21 // <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
22 // int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
23 // only when using GCC.
24# if defined __GNUC__
25# define BOOST_HAS_STDINT_H
26# endif
27#endif
28
29#if defined(__LIBCOMO__)
30 //
31 // como on linux doesn't have std:: c functions:
32 // NOTE: versions of libcomo prior to beta28 have octal version numbering,
33 // e.g. version 25 is 21 (dec)
34 //
35# if __LIBCOMO_VERSION__ <= 20
36# define BOOST_NO_STDC_NAMESPACE
37# endif
38
39# if __LIBCOMO_VERSION__ <= 21
40# define BOOST_NO_SWPRINTF
41# endif
42
43#endif
44
45//
46// If glibc is past version 2 then we definitely have
47// gettimeofday, earlier versions may or may not have it:
48//
49#if defined(__GLIBC__) && (__GLIBC__ >= 2)
50# define BOOST_HAS_GETTIMEOFDAY
51#endif
52
53#ifdef __USE_POSIX199309
54# define BOOST_HAS_NANOSLEEP
55#endif
56
57#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
58// __GLIBC_PREREQ is available since 2.1.2
59
60 // swprintf is available since glibc 2.2.0
61# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
62# define BOOST_NO_SWPRINTF
63# endif
64#else
65# define BOOST_NO_SWPRINTF
66#endif
67
68// boilerplate code:
69#define BOOST_HAS_UNISTD_H
70#include <boost/config/posix_features.hpp>
71
72#ifndef __GNUC__
73//
74// if the compiler is not gcc we still need to be able to parse
75// the GNU system headers, some of which (mainly <stdint.h>)
76// use GNU specific extensions:
77//
78# ifndef __extension__
79# define __extension__
80# endif
81# ifndef __const__
82# define __const__ const
83# endif
84# ifndef __volatile__
85# define __volatile__ volatile
86# endif
87# ifndef __signed__
88# define __signed__ signed
89# endif
90# ifndef __typeof__
91# define __typeof__ typeof
92# endif
93# ifndef __inline__
94# define __inline__ inline
95# endif
96#endif
97
98
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette