net.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
  31. # define BOOST_OS_BSD_AVAILABLE
  32. # endif
  33. # undef BOOST_OS_BSD_NET
  34. # if defined(__NETBSD__)
  35. # if defined(__NETBSD_version)
  36. # if __NETBSD_version < 500000
  37. # define BOOST_OS_BSD_NET \
  38. BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version)
  39. # else
  40. # define BOOST_OS_BSD_NET \
  41. BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version)
  42. # endif
  43. # else
  44. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
  45. # endif
  46. # elif defined(__NetBSD__)
  47. # if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8)
  48. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0)
  49. # endif
  50. # if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9)
  51. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0)
  52. # endif
  53. # if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0)
  54. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0)
  55. # endif
  56. # if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version)
  57. # define BOOST_OS_BSD_NET \
  58. BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version)
  59. # endif
  60. # if !defined(BOOST_OS_BSD_NET)
  61. # define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
  62. # endif
  63. # endif
  64. #endif
  65. #if BOOST_OS_BSD_NET
  66. # define BOOST_OS_BSD_NET_AVAILABLE
  67. # include <boost/predef/detail/os_detected.h>
  68. #endif
  69. #define BOOST_OS_BSD_NET_NAME "NetBSD"
  70. #endif
  71. #include <boost/predef/detail/test.h>
  72. BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME)