linux-gnueabi.hpp 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. // See http://www.boost.org for most recent version.
  7. // linux specific config options:
  8. #define BOOST_PLATFORM "linux"
  9. // make sure we have __GLIBC_PREREQ if available at all
  10. #ifdef __cplusplus
  11. #include <cstdlib>
  12. #else
  13. #include <stdlib.h>
  14. #endif
  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. #if defined(__LIBCOMO__)
  28. //
  29. // como on linux doesn't have std:: c functions:
  30. // NOTE: versions of libcomo prior to beta28 have octal version numbering,
  31. // e.g. version 25 is 21 (dec)
  32. //
  33. # if __LIBCOMO_VERSION__ <= 20
  34. # define BOOST_NO_STDC_NAMESPACE
  35. # endif
  36. # if __LIBCOMO_VERSION__ <= 21
  37. # define BOOST_NO_SWPRINTF
  38. # endif
  39. #endif
  40. //
  41. // If glibc is past version 2 then we definitely have
  42. // gettimeofday, earlier versions may or may not have it:
  43. //
  44. #if defined(__GLIBC__) && (__GLIBC__ >= 2)
  45. # define BOOST_HAS_GETTIMEOFDAY
  46. #endif
  47. #ifdef __USE_POSIX199309
  48. # define BOOST_HAS_NANOSLEEP
  49. #endif
  50. #if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
  51. // __GLIBC_PREREQ is available since 2.1.2
  52. // swprintf is available since glibc 2.2.0
  53. # if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98))
  54. # define BOOST_NO_SWPRINTF
  55. # endif
  56. #else
  57. # define BOOST_NO_SWPRINTF
  58. #endif
  59. // boilerplate code:
  60. #define BOOST_HAS_UNISTD_H
  61. #include <boost/config/posix_features.hpp>
  62. #ifdef __USE_GNU
  63. #define BOOST_HAS_PTHREAD_YIELD
  64. #endif
  65. #ifndef __GNUC__
  66. //
  67. // if the compiler is not gcc we still need to be able to parse
  68. // the GNU system headers, some of which (mainly <stdint.h>)
  69. // use GNU specific extensions:
  70. //
  71. # ifndef __extension__
  72. # define __extension__
  73. # endif
  74. # ifndef __const__
  75. # define __const__ const
  76. # endif
  77. # ifndef __volatile__
  78. # define __volatile__ volatile
  79. # endif
  80. # ifndef __signed__
  81. # define __signed__ signed
  82. # endif
  83. # ifndef __typeof__
  84. # define __typeof__ typeof
  85. # endif
  86. # ifndef __inline__
  87. # define __inline__ inline
  88. # endif
  89. #endif