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 #       undef BOOST_OS_BSD
40 #       define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
41 #       define BOOST_OS_BSD_AVAILABLE
42 #   endif
43 #   undef BOOST_OS_BSD_NET
44 #   if defined(__NETBSD__)
45 #       if defined(__NETBSD_version)
46 #           if __NETBSD_version < 500000
47 #               define BOOST_OS_BSD_NET \
48                     BOOST_PREDEF_MAKE_10_VRP000(__NETBSD_version)
49 #           else
50 #               define BOOST_OS_BSD_NET \
51                     BOOST_PREDEF_MAKE_10_VRR000(__NETBSD_version)
52 #           endif
53 #       else
54 #           define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
55 #       endif
56 #   elif defined(__NetBSD__)
57 #       if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_8)
58 #           define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,8,0)
59 #       endif
60 #       if !defined(BOOST_OS_BSD_NET) && defined(NetBSD0_9)
61 #           define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(0,9,0)
62 #       endif
63 #       if !defined(BOOST_OS_BSD_NET) && defined(NetBSD1_0)
64 #           define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER(1,0,0)
65 #       endif
66 #       if !defined(BOOST_OS_BSD_NET) && defined(__NetBSD_Version)
67 #           define BOOST_OS_BSD_NET \
68                 BOOST_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version)
69 #       endif
70 #       if !defined(BOOST_OS_BSD_NET)
71 #           define BOOST_OS_BSD_NET BOOST_VERSION_NUMBER_AVAILABLE
72 #       endif
73 #   endif
74 #endif
75 
76 #if BOOST_OS_BSD_NET
77 #   define BOOST_OS_BSD_NET_AVAILABLE
78 #   include <boost/predef/detail/os_detected.h>
79 #endif
80 
81 #define BOOST_OS_BSD_NET_NAME "NetBSD"
82 
83 #endif
84 
85 #include <boost/predef/detail/test.h>
86 BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_NET,BOOST_OS_BSD_NET_NAME)
87