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