]> git.lyx.org Git - lyx.git/blob - boost/boost/config/platform/linux.hpp
update from Boost CVS
[lyx.git] / boost / boost / config / platform / linux.hpp
1 //  (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
2 //  distribute this software is granted provided this copyright notice appears
3 //  in all copies. This software is provided "as is" without express or implied
4 //  warranty, and with no claim as to its suitability for any purpose.
5
6 //  See http://www.boost.org for most recent version.
7
8 //  linux specific config options:
9
10 #define BOOST_PLATFORM "linux"
11
12 // make sure we have __GLIBC_PREREQ if available at all
13 #include <cstdlib>
14
15 //
16 // <stdint.h> added to glibc 2.1.1
17 // We can only test for 2.1 though:
18 //
19 #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
20    // <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
21    // int64_t only if __GNUC__.  Thus, assume a fully usable <stdint.h>
22    // only when using GCC.
23 #  if defined __GNUC__
24 #    define BOOST_HAS_STDINT_H
25 #  endif
26 #endif
27
28 //
29 // como on linux doesn't have std:: c functions:
30 //
31 #ifdef __COMO__
32 #  define BOOST_NO_STDC_NAMESPACE
33 #endif
34
35 //
36 // Intel on linux doesn't have swprintf in std::
37 //
38 #ifdef  __ICC
39 #  define BOOST_NO_STDC_NAMESPACE
40 #endif
41
42 //
43 // If glibc is past version 2 then we definitely have
44 // gettimeofday, earlier versions may or may not have it:
45 //
46 #if defined(__GLIBC__) && (__GLIBC__ >= 2)
47 #  define BOOST_HAS_GETTIMEOFDAY
48 #endif
49
50 #ifdef __USE_POSIX199309
51 #  define BOOST_HAS_NANOSLEEP
52 #endif
53
54 #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
55 // __GLIBC_PREREQ is available since 2.1.2
56
57    // swprintf is available since glibc 2.2.0
58 #  if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
59 #    define BOOST_NO_SWPRINTF
60 #  endif
61 #else
62 #  define BOOST_NO_SWPRINTF
63 #endif
64
65 // boilerplate code:
66 #define BOOST_HAS_UNISTD_H
67 #include <boost/config/posix_features.hpp>
68
69 #ifndef __GNUC__
70 //
71 // if the compiler is not gcc we still need to be able to parse
72 // the GNU system headers, some of which (mainly <stdint.h>)
73 // use GNU specific extensions:
74 //
75 #  ifndef __extension__
76 #     define __extension__
77 #  endif
78 #  ifndef __const__
79 #     define __const__ const
80 #  endif
81 #  ifndef __volatile__
82 #     define __volatile__ volatile
83 #  endif
84 #  ifndef __signed__
85 #     define __signed__ signed
86 #  endif
87 #  ifndef __typeof__
88 #     define __typeof__ typeof
89 #  endif
90 #  ifndef __inline__
91 #     define __inline__ inline
92 #  endif
93 #endif
94