Chris@16
|
1 /*
|
Chris@101
|
2 Copyright Rene Rivera 2008-2013
|
Chris@16
|
3 Distributed under the Boost Software License, Version 1.0.
|
Chris@16
|
4 (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
5 http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
6 */
|
Chris@16
|
7
|
Chris@16
|
8 #ifndef BOOST_PREDEF_OS_BSD_H
|
Chris@16
|
9 #define BOOST_PREDEF_OS_BSD_H
|
Chris@16
|
10
|
Chris@16
|
11 /* Special case: OSX will define BSD predefs if the sys/param.h
|
Chris@16
|
12 * header is included. We can guard against that, but only if we
|
Chris@16
|
13 * detect OSX first. Hence we will force include OSX detection
|
Chris@16
|
14 * before doing any BSD detection.
|
Chris@16
|
15 */
|
Chris@16
|
16 #include <boost/predef/os/macos.h>
|
Chris@16
|
17
|
Chris@16
|
18 #include <boost/predef/version_number.h>
|
Chris@16
|
19 #include <boost/predef/make.h>
|
Chris@16
|
20
|
Chris@16
|
21 /*`
|
Chris@16
|
22 [heading `BOOST_OS_BSD`]
|
Chris@16
|
23
|
Chris@16
|
24 [@http://en.wikipedia.org/wiki/Berkeley_Software_Distribution BSD] operating system.
|
Chris@16
|
25
|
Chris@16
|
26 BSD has various branch operating systems possible and each detected
|
Chris@16
|
27 individually. This detects the following variations and sets a specific
|
Chris@16
|
28 version number macro to match:
|
Chris@16
|
29
|
Chris@16
|
30 * `BOOST_OS_BSD_DRAGONFLY` [@http://en.wikipedia.org/wiki/DragonFly_BSD DragonFly BSD]
|
Chris@16
|
31 * `BOOST_OS_BSD_FREE` [@http://en.wikipedia.org/wiki/Freebsd FreeBSD]
|
Chris@16
|
32 * `BOOST_OS_BSD_BSDI` [@http://en.wikipedia.org/wiki/BSD/OS BSDi BSD/OS]
|
Chris@16
|
33 * `BOOST_OS_BSD_NET` [@http://en.wikipedia.org/wiki/Netbsd NetBSD]
|
Chris@16
|
34 * `BOOST_OS_BSD_OPEN` [@http://en.wikipedia.org/wiki/Openbsd OpenBSD]
|
Chris@16
|
35
|
Chris@16
|
36 [note The general `BOOST_OS_BSD` is set in all cases to indicate some form
|
Chris@16
|
37 of BSD. If the above variants is detected the corresponding macro is also set.]
|
Chris@16
|
38
|
Chris@16
|
39 [table
|
Chris@16
|
40 [[__predef_symbol__] [__predef_version__]]
|
Chris@16
|
41
|
Chris@16
|
42 [[`BSD`] [__predef_detection__]]
|
Chris@16
|
43 [[`_SYSTYPE_BSD`] [__predef_detection__]]
|
Chris@16
|
44
|
Chris@16
|
45 [[`BSD4_2`] [4.2.0]]
|
Chris@16
|
46 [[`BSD4_3`] [4.3.0]]
|
Chris@16
|
47 [[`BSD4_4`] [4.4.0]]
|
Chris@16
|
48 [[`BSD`] [V.R.0]]
|
Chris@16
|
49 ]
|
Chris@16
|
50 */
|
Chris@16
|
51
|
Chris@16
|
52 #include <boost/predef/os/bsd/bsdi.h>
|
Chris@16
|
53 #include <boost/predef/os/bsd/dragonfly.h>
|
Chris@16
|
54 #include <boost/predef/os/bsd/free.h>
|
Chris@16
|
55 #include <boost/predef/os/bsd/open.h>
|
Chris@16
|
56 #include <boost/predef/os/bsd/net.h>
|
Chris@16
|
57
|
Chris@16
|
58 #ifndef BOOST_OS_BSD
|
Chris@16
|
59 #define BOOST_OS_BSD BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
Chris@16
|
60 #endif
|
Chris@16
|
61
|
Chris@101
|
62 #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
Chris@16
|
63 defined(BSD) || \
|
Chris@16
|
64 defined(_SYSTYPE_BSD) \
|
Chris@16
|
65 )
|
Chris@16
|
66 # undef BOOST_OS_BSD
|
Chris@16
|
67 # include <sys/param.h>
|
Chris@16
|
68 # if !defined(BOOST_OS_BSD) && defined(BSD4_4)
|
Chris@16
|
69 # define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,4,0)
|
Chris@16
|
70 # endif
|
Chris@16
|
71 # if !defined(BOOST_OS_BSD) && defined(BSD4_3)
|
Chris@16
|
72 # define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,3,0)
|
Chris@16
|
73 # endif
|
Chris@16
|
74 # if !defined(BOOST_OS_BSD) && defined(BSD4_2)
|
Chris@16
|
75 # define BOOST_OS_BSD BOOST_VERSION_NUMBER(4,2,0)
|
Chris@16
|
76 # endif
|
Chris@16
|
77 # if !defined(BOOST_OS_BSD) && defined(BSD)
|
Chris@16
|
78 # define BOOST_OS_BSD BOOST_PREDEF_MAKE_10_VVRR(BSD)
|
Chris@16
|
79 # endif
|
Chris@16
|
80 # if !defined(BOOST_OS_BSD)
|
Chris@16
|
81 # define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
|
Chris@16
|
82 # endif
|
Chris@16
|
83 #endif
|
Chris@16
|
84
|
Chris@16
|
85 #if BOOST_OS_BSD
|
Chris@16
|
86 # define BOOST_OS_BSD_AVAILABLE
|
Chris@16
|
87 # include <boost/predef/detail/os_detected.h>
|
Chris@16
|
88 #endif
|
Chris@16
|
89
|
Chris@16
|
90 #define BOOST_OS_BSD_NAME "BSD"
|
Chris@16
|
91
|
Chris@16
|
92 #include <boost/predef/detail/test.h>
|
Chris@16
|
93 BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD,BOOST_OS_BSD_NAME)
|
Chris@16
|
94
|
Chris@16
|
95 #endif
|