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