net.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. Copyright Rene Rivera 2012-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_BSD_NET_H
  8. #define BOOST_PREDEF_OS_BSD_NET_H
  9. #include <boost/predef/os/bsd.h>
  10. /* tag::reference[]
  11. = `BOOST_OS_BSD_NET`
  12. http://en.wikipedia.org/wiki/Netbsd[NetBSD] operating system.
  13. [options="header"]
  14. |===
  15. | {predef_symbol} | {predef_version}
  16. | `+__NETBSD__+` | {predef_detection}
  17. | `+__NetBSD__+` | {predef_detection}
  18. | `+__NETBSD_version+` | V.R.P
  19. | `NetBSD0_8` | 0.8.0
  20. | `NetBSD0_9` | 0.9.0
  21. | `NetBSD1_0` | 1.0.0
  22. | `+__NetBSD_Version+` | V.R.P
  23. |===
  24. */ // end::reference[]
  25. #define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_NOT_AVAILABLE
  26. #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
  27. defined(__NETBSD__) || defined(__NetBSD__) \
  28. )
  29. # ifndef BOOST_OS_BSD_AVAILABLE
  30. # undef BOOST_OS_BSD
  31. # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
  32. # define BOOST_OS_BSD_AVAILABLE
  33. # endif
  34. # undef BOOST_OS_BSD_NET
  35. # if defined(__NETBSD__)
  36. # if defined(__NETBSD_version)
  37. # if __NETBSD_version < 500000
  38. # define BOOST_OS_BSD_NET \
  39. BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version)
  40. # else
  41. # define BOOST_OS_BSD_NET \
  42. BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version)
  43. # endif
  44. # else
  45. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
  46. # endif
  47. # elif defined(__NetBSD__)
  48. # if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8)
  49. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0)
  50. # endif
  51. # if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9)
  52. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0)
  53. # endif
  54. # if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0)
  55. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0)
  56. # endif
  57. # if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version)
  58. # define BOOST_OS_BSD_NET \
  59. BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version)
  60. # endif
  61. # if !defined(BOOST_OS_BSD_NET)
  62. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
  63. # endif
  64. # endif
  65. #endif
  66. #if BOOST_OS_BSD_NET
  67. # define BOOST_OS_BSD_NET_AVAILABLE
  68. # include <boost/predef/detail/os_detected.h>
  69. #endif
  70. #define BOOST_OS_BSD_NET_NAME "NetBSD"
  71. #endif
  72. #include <boost/predef/detail/test.h>
  73. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME)