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#ifdef __cplusplus
15#include <cstdlib>
16#else
17#include <stdlib.h>
18#endif
19
20//
21// <stdint.h> added to glibc 2.1.1
22// We can only test for 2.1 though:
23//
24#if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
25 // <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
26 // int64_t only if __GNUC__. Thus, assume a fully usable <stdint.h>
27 // only when using GCC. Update 2017: this appears not to be the case for
28 // recent glibc releases, see bug report: https://svn.boost.org/trac/boost/ticket/13045
29# if defined(__GNUC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 5)))
30# define BOOST_HAS_STDINT_H
31# endif
32#endif
33
34#if defined(__LIBCOMO__)
35 //
36 // como on linux doesn't have std:: c functions:
37 // NOTE: versions of libcomo prior to beta28 have octal version numbering,
38 // e.g. version 25 is 21 (dec)
39 //
40# if __LIBCOMO_VERSION__ <= 20
41# define BOOST_NO_STDC_NAMESPACE
42# endif
43
44# if __LIBCOMO_VERSION__ <= 21
45# define BOOST_NO_SWPRINTF
46# endif
47
48#endif
49
50//
51// If glibc is past version 2 then we definitely have
52// gettimeofday, earlier versions may or may not have it:
53//
54#if defined(__GLIBC__) && (__GLIBC__ >= 2)
55# define BOOST_HAS_GETTIMEOFDAY
56#endif
57
58#ifdef __USE_POSIX199309
59# define BOOST_HAS_NANOSLEEP
60#endif
61
62#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
63// __GLIBC_PREREQ is available since 2.1.2
64
65 // swprintf is available since glibc 2.2.0
66# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
67# define BOOST_NO_SWPRINTF
68# endif
69#else
70# define BOOST_NO_SWPRINTF
71#endif
72
73// boilerplate code:
74#define BOOST_HAS_UNISTD_H
75#include <boost/config/detail/posix_features.hpp>
76#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID)
77#define BOOST_HAS_PTHREAD_YIELD
78#endif
79
80#ifndef __GNUC__
81//
82// if the compiler is not gcc we still need to be able to parse
83// the GNU system headers, some of which (mainly <stdint.h>)
84// use GNU specific extensions:
85//
86# ifndef __extension__
87# define __extension__
88# endif
89# ifndef __const__
90# define __const__ const
91# endif
92# ifndef __volatile__
93# define __volatile__ volatile
94# endif
95# ifndef __signed__
96# define __signed__ signed
97# endif
98# ifndef __typeof__
99# define __typeof__ typeof
100# endif
101# ifndef __inline__
102# define __inline__ inline
103# endif
104#endif
105
106
107

source code of include/boost/config/platform/linux.hpp