1 /*
2 Copyright Rene Rivera 2008-2015
3 Copyright Franz Detro 2014
4 Distributed under the Boost Software License, Version 1.0.
5 (See accompanying file LICENSE_1_0.txt or copy at
6 http://www.boost.org/LICENSE_1_0.txt)
7 */
8 
9 #ifndef MSGPACK_PREDEF_OS_MACOS_H
10 #define MSGPACK_PREDEF_OS_MACOS_H
11 
12 /* Special case: iOS will define the same predefs as MacOS, and additionally
13  '__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__'. We can guard against that,
14  but only if we detect iOS first. Hence we will force include iOS detection
15  * before doing any MacOS detection.
16  */
17 #include <msgpack/predef/os/ios.h>
18 
19 #include <msgpack/predef/version_number.h>
20 #include <msgpack/predef/make.h>
21 
22 /*`
23 [heading `MSGPACK_OS_MACOS`]
24 
25 [@http://en.wikipedia.org/wiki/Mac_OS Mac OS] operating system.
26 
27 [table
28     [[__predef_symbol__] [__predef_version__]]
29 
30     [[`macintosh`] [__predef_detection__]]
31     [[`Macintosh`] [__predef_detection__]]
32     [[`__APPLE__`] [__predef_detection__]]
33     [[`__MACH__`] [__predef_detection__]]
34 
35     [[`__APPLE__`, `__MACH__`] [10.0.0]]
36     [[ /otherwise/ ] [9.0.0]]
37     ]
38  */
39 
40 #define MSGPACK_OS_MACOS MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
41 
42 #if !defined(MSGPACK_PREDEF_DETAIL_OS_DETECTED) && ( \
43     defined(macintosh) || defined(Macintosh) || \
44     (defined(__APPLE__) && defined(__MACH__)) \
45     )
46 #   undef MSGPACK_OS_MACOS
47 #   if !defined(MSGPACK_OS_MACOS) && defined(__APPLE__) && defined(__MACH__)
48 #       define MSGPACK_OS_MACOS MSGPACK_VERSION_NUMBER(10,0,0)
49 #   endif
50 #   if !defined(MSGPACK_OS_MACOS)
51 #       define MSGPACK_OS_MACOS MSGPACK_VERSION_NUMBER(9,0,0)
52 #   endif
53 #endif
54 
55 #if MSGPACK_OS_MACOS
56 #   define MSGPACK_OS_MACOS_AVAILABLE
57 #   include <msgpack/predef/detail/os_detected.h>
58 #endif
59 
60 #define MSGPACK_OS_MACOS_NAME "Mac OS"
61 
62 #endif
63 
64 #include <msgpack/predef/detail/test.h>
65 MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_OS_MACOS,MSGPACK_OS_MACOS_NAME)
66