gnu.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. Copyright Rene Rivera 2008-2015
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt)
  6. */
  7. #ifndef BOOST_PREDEF_LIBRARY_C_GNU_H
  8. #define BOOST_PREDEF_LIBRARY_C_GNU_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. #include <boost/predef/library/c/_prefix.h>
  12. #if defined(__STDC__)
  13. #include <stddef.h>
  14. #elif defined(__cplusplus)
  15. #include <cstddef>
  16. #endif
  17. /*`
  18. [heading `BOOST_LIB_C_GNU`]
  19. [@http://en.wikipedia.org/wiki/Glibc GNU glibc] Standard C library.
  20. Version number available as major, and minor.
  21. [table
  22. [[__predef_symbol__] [__predef_version__]]
  23. [[`__GLIBC__`] [__predef_detection__]]
  24. [[`__GNU_LIBRARY__`] [__predef_detection__]]
  25. [[`__GLIBC__`, `__GLIBC_MINOR__`] [V.R.0]]
  26. [[`__GNU_LIBRARY__`, `__GNU_LIBRARY_MINOR__`] [V.R.0]]
  27. ]
  28. */
  29. #define BOOST_LIB_C_GNU BOOST_VERSION_NUMBER_NOT_AVAILABLE
  30. #if defined(__GLIBC__) || defined(__GNU_LIBRARY__)
  31. # undef BOOST_LIB_C_GNU
  32. # if defined(__GLIBC__)
  33. # define BOOST_LIB_C_GNU \
  34. BOOST_VERSION_NUMBER(__GLIBC__,__GLIBC_MINOR__,0)
  35. # else
  36. # define BOOST_LIB_C_GNU \
  37. BOOST_VERSION_NUMBER(__GNU_LIBRARY__,__GNU_LIBRARY_MINOR__,0)
  38. # endif
  39. #endif
  40. #if BOOST_LIB_C_GNU
  41. # define BOOST_LIB_C_GNU_AVAILABLE
  42. #endif
  43. #define BOOST_LIB_C_GNU_NAME "GNU"
  44. #endif
  45. #include <boost/predef/detail/test.h>
  46. BOOST_PREDEF_DECLARE_TEST(BOOST_LIB_C_GNU,BOOST_LIB_C_GNU_NAME)