linux.hpp
Go to the documentation of this file.
00001 //  (C) Copyright John Maddock 2001 - 2003. 
00002 //  (C) Copyright Jens Maurer 2001 - 2003. 
00003 //  Use, modification and distribution are subject to the 
00004 //  Boost Software License, Version 1.0. (See accompanying file 
00005 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  See http://www.boost.org for most recent version.
00008 
00009 //  linux specific config options:
00010 
00011 #define BOOST_PLATFORM "linux"
00012 
00013 // make sure we have __GLIBC_PREREQ if available at all
00014 #include <cstdlib>
00015 
00016 //
00017 // <stdint.h> added to glibc 2.1.1
00018 // We can only test for 2.1 though:
00019 //
00020 #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1)))
00021    // <stdint.h> defines int64_t unconditionally, but <sys/types.h> defines
00022    // int64_t only if __GNUC__.  Thus, assume a fully usable <stdint.h>
00023    // only when using GCC.
00024 #  if defined __GNUC__
00025 #    define BOOST_HAS_STDINT_H
00026 #  endif
00027 #endif
00028 
00029 #if defined(__LIBCOMO__)
00030    //
00031    // como on linux doesn't have std:: c functions:
00032    // NOTE: versions of libcomo prior to beta28 have octal version numbering,
00033    // e.g. version 25 is 21 (dec)
00034    //
00035 #  if __LIBCOMO_VERSION__ <= 20
00036 #    define BOOST_NO_STDC_NAMESPACE
00037 #  endif
00038 
00039 #  if __LIBCOMO_VERSION__ <= 21
00040 #    define BOOST_NO_SWPRINTF
00041 #  endif
00042 
00043 #endif
00044 
00045 //
00046 // If glibc is past version 2 then we definitely have
00047 // gettimeofday, earlier versions may or may not have it:
00048 //
00049 #if defined(__GLIBC__) && (__GLIBC__ >= 2)
00050 #  define BOOST_HAS_GETTIMEOFDAY
00051 #endif
00052 
00053 #ifdef __USE_POSIX199309
00054 #  define BOOST_HAS_NANOSLEEP
00055 #endif
00056 
00057 #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
00058 // __GLIBC_PREREQ is available since 2.1.2
00059 
00060    // swprintf is available since glibc 2.2.0
00061 #  if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
00062 #    define BOOST_NO_SWPRINTF
00063 #  endif
00064 #else
00065 #  define BOOST_NO_SWPRINTF
00066 #endif
00067 
00068 // boilerplate code:
00069 #define BOOST_HAS_UNISTD_H
00070 #include <boost/config/posix_features.hpp>
00071 
00072 #ifndef __GNUC__
00073 //
00074 // if the compiler is not gcc we still need to be able to parse
00075 // the GNU system headers, some of which (mainly <stdint.h>)
00076 // use GNU specific extensions:
00077 //
00078 #  ifndef __extension__
00079 #     define __extension__
00080 #  endif
00081 #  ifndef __const__
00082 #     define __const__ const
00083 #  endif
00084 #  ifndef __volatile__
00085 #     define __volatile__ volatile
00086 #  endif
00087 #  ifndef __signed__
00088 #     define __signed__ signed
00089 #  endif
00090 #  ifndef __typeof__
00091 #     define __typeof__ typeof
00092 #  endif
00093 #  ifndef __inline__
00094 #     define __inline__ inline
00095 #  endif
00096 #endif
00097 
00098 


appl
Author(s): petercai
autogenerated on Tue Jan 7 2014 11:02:29