RESTinio
Loading...
Searching...
No Matches
detect_os.hpp
Go to the documentation of this file.
1/*!
2 * @file
3 * @brief Helper macros for detection of compiler/platform.
4 */
5
6#pragma once
7
8/*!
9 * @def RESTINIO_OS_WIN32
10 * @brief A marker for Win32 platform.
11 *
12 * @note This marker is also defined for Win64 platform.
13 */
14
15/*!
16 * @def RESTINIO_OS_WIN64
17 * @brief A marker for Win64 platform.
18 */
19
20/*!
21 * @def RESTINIO_OS_WINDOWS
22 * @brief A marker for Windows platform.
23 *
24 * Defined if RESTINIO_OS_WIN32 or RESTINIO_OS_WIN64 are defined.
25 */
26
27/*!
28 * @def RESTINIO_OS_UNIX
29 * @brief A marker for Unix platforms, but not macOS/iOS.
30 */
31
32/*!
33 * @def RESTINIO_OS_APPLE
34 * @brief A marker for macOS/iOS.
35 */
36
37#if defined( _WIN64 )
38 #define RESTINIO_OS_WIN64
39#endif
40
41#if defined( _WIN32 )
42 #define RESTINIO_OS_WIN32
43#endif
44
45#if defined( RESTINIO_OS_WIN32 ) || defined( RESTINIO_OS_WIN64 )
46 #define RESTINIO_OS_WINDOWS
47#endif
48
49#if defined(unix) || defined(__unix__) || defined(__unix)
50 #define RESTINIO_OS_UNIX
51#endif
52
53#if defined(__APPLE__)
54 #define RESTINIO_OS_APPLE
55#endif