• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_FREE_H
9 #define BOOST_PREDEF_OS_BSD_FREE_H
10 
11 #include <boost/predef/os/bsd.h>
12 
13 /* tag::reference[]
14 = `BOOST_OS_BSD_FREE`
15 
16 http://en.wikipedia.org/wiki/Freebsd[FreeBSD] operating system.
17 
18 [options="header"]
19 |===
20 | {predef_symbol} | {predef_version}
21 
22 | `+__FreeBSD__+` | {predef_detection}
23 
24 | `+__FreeBSD_version+` | V.R.P
25 |===
26 */ // end::reference[]
27 
28 #define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_NOT_AVAILABLE
29 
30 #if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
31     defined(__FreeBSD__) \
32     )
33 #   ifndef BOOST_OS_BSD_AVAILABLE
34 #       define BOOST_OS_BSD BOOST_VERSION_NUMBER_AVAILABLE
35 #       define BOOST_OS_BSD_AVAILABLE
36 #   endif
37 #   undef BOOST_OS_BSD_FREE
38 #   include <sys/param.h>
39 #   if defined(__FreeBSD_version)
40 #       if __FreeBSD_version == 491000
41 #           define BOOST_OS_BSD_FREE \
42                 BOOST_VERSION_NUMBER(4, 10, 0)
43 #       elif __FreeBSD_version == 492000
44 #           define BOOST_OS_BSD_FREE \
45                 BOOST_VERSION_NUMBER(4, 11, 0)
46 #       elif __FreeBSD_version < 500000
47 #           define BOOST_OS_BSD_FREE \
48                 BOOST_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version)
49 #       else
50 #           define BOOST_OS_BSD_FREE \
51                 BOOST_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version)
52 #       endif
53 #   else
54 #       define BOOST_OS_BSD_FREE BOOST_VERSION_NUMBER_AVAILABLE
55 #   endif
56 #endif
57 
58 #if BOOST_OS_BSD_FREE
59 #   define BOOST_OS_BSD_FREE_AVAILABLE
60 #   include <boost/predef/detail/os_detected.h>
61 #endif
62 
63 #define BOOST_OS_BSD_FREE_NAME "Free BSD"
64 
65 #endif
66 
67 #include <boost/predef/detail/test.h>
68 BOOST_PREDEF_DECLARE_TEST(BOOST_OS_BSD_FREE,BOOST_OS_BSD_FREE_NAME)
69