net.h 2.5 KB

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