unix.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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_OS_UNIX_H
  8. #define BOOST_PREDEF_OS_UNIX_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_OS_UNIX`]
  13. [@http://en.wikipedia.org/wiki/Unix Unix Environment] operating system.
  14. [table
  15. [[__predef_symbol__] [__predef_version__]]
  16. [[`unix`] [__predef_detection__]]
  17. [[`__unix`] [__predef_detection__]]
  18. [[`_XOPEN_SOURCE`] [__predef_detection__]]
  19. [[`_POSIX_SOURCE`] [__predef_detection__]]
  20. ]
  21. */
  22. #define BOOST_OS_UNIX BOOST_VERSION_NUMBER_NOT_AVAILABLE
  23. #if defined(unix) || defined(__unix) || \
  24. defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
  25. # undef BOOST_OS_UNIX
  26. # define BOOST_OS_UNIX BOOST_VERSION_NUMBER_AVAILABLE
  27. #endif
  28. #if BOOST_OS_UNIX
  29. # define BOOST_OS_UNIX_AVAILABLE
  30. #endif
  31. #define BOOST_OS_UNIX_NAME "Unix Environment"
  32. /*`
  33. [heading `BOOST_OS_SVR4`]
  34. [@http://en.wikipedia.org/wiki/UNIX_System_V SVR4 Environment] operating system.
  35. [table
  36. [[__predef_symbol__] [__predef_version__]]
  37. [[`__sysv__`] [__predef_detection__]]
  38. [[`__SVR4`] [__predef_detection__]]
  39. [[`__svr4__`] [__predef_detection__]]
  40. [[`_SYSTYPE_SVR4`] [__predef_detection__]]
  41. ]
  42. */
  43. #define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_NOT_AVAILABLE
  44. #if defined(__sysv__) || defined(__SVR4) || \
  45. defined(__svr4__) || defined(_SYSTYPE_SVR4)
  46. # undef BOOST_OS_SVR4
  47. # define BOOST_OS_SVR4 BOOST_VERSION_NUMBER_AVAILABLE
  48. #endif
  49. #if BOOST_OS_SVR4
  50. # define BOOST_OS_SVR4_AVAILABLE
  51. #endif
  52. #define BOOST_OS_SVR4_NAME "SVR4 Environment"
  53. #endif
  54. #include <boost/predef/detail/test.h>
  55. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_UNIX,BOOST_OS_UNIX_NAME)
  56. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_SVR4,BOOST_OS_SVR4_NAME)