Debian Codegraph @

crt/aws-c-common/include/aws/common/platform.h

raw symbols SCIP
1 #ifndef AWS_COMMON_PLATFORM_H
2 #define AWS_COMMON_PLATFORM_H
3
4 /**
5 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
6 * SPDX-License-Identifier: Apache-2.0.
7 */
8
9 #include <aws/common/config.h>
10
11 #ifdef _WIN32
12 # define AWS_OS_WINDOWS
13 /* indicate whether this is for Windows desktop, or UWP or Windows S, or other Windows-like devices */
14 # if defined(AWS_HAVE_WINAPI_DESKTOP)
15 # define AWS_OS_WINDOWS_DESKTOP
16 # endif
17
18 #elif __APPLE__
19 # define AWS_OS_APPLE
20 # include "TargetConditionals.h"
21 # if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
22 # define AWS_OS_IOS
23 # elif defined(TARGET_OS_WATCH) && TARGET_OS_WATCH
24 # define AWS_OS_WATCHOS
25 # elif defined(TARGET_OS_TV) && TARGET_OS_TV
26 # define AWS_OS_TVOS
27 # else
28 # define AWS_OS_MACOS
29 # endif
30 #elif __linux__
31 # define AWS_OS_LINUX
32 #endif
33
34 #if defined(__ANDROID__)
35 # define AWS_OS_ANDROID
36 #endif
37
38 #if defined(_POSIX_VERSION)
39 # define AWS_OS_POSIX
40 #endif
41
42 #endif /* AWS_COMMON_PLATFORM_H */