|
NIM 跨平台 C++ SDK
|
浏览该文件的文档. 1#ifndef NE_STL_INCLUDE_PLANTFORM_H
2#define NE_STL_INCLUDE_PLANTFORM_H
5#define NE_STL_OS_ANDROID 1
6#elif defined(__APPLE__)
7#include <TargetConditionals.h>
8#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
11#define NE_STL_OS_MACOSX 1
13#elif defined(__linux__)
14#define NE_STL_OS_LINUX 1
17#define NE_STL_OS_WIN 1
18#elif defined(__Fuchsia__)
19#define NE_STL_OS_FUCHSIA 1
20#elif defined(__FreeBSD__)
21#define NE_STL_OS_FREEBSD 1
22#elif defined(__NetBSD__)
23#define NE_STL_OS_NETBSD 1
24#elif defined(__OpenBSD__)
25#define NE_STL_OS_OPENBSD 1
27#define NE_STL_OS_SOLARIS 1
28#elif defined(__QNXNTO__)
29#define NE_STL_OS_QNX 1
31#define NE_STL_OS_AIX 1
32#elif defined(__asmjs__)
33#define NE_STL_OS_ASMJS
35#error Please add support for your platform in build/build_config.h
37#if defined(NE_STL_OS_FREEBSD) || defined(NE_STL_OS_NETBSD) || defined(NE_STL_OS_OPENBSD)
38#define NE_STL_OS_BSD 1
40#if defined(NE_STL_OS_AIX) || defined(NE_STL_OS_ANDROID) || defined(NE_STL_OS_ASMJS) || defined(NE_STL_OS_FREEBSD) || defined(NE_STL_OS_LINUX) || \
41 defined(NE_STL_OS_MACOSX) || defined(NE_STL_OS_NACL) || defined(NE_STL_OS_NETBSD) || defined(NE_STL_OS_OPENBSD) || defined(NE_STL_OS_QNX) || \
42 defined(NE_STL_OS_SOLARIS)
43#define NE_STL_OS_POSIX 1
46#if defined(_M_X64) || defined(__x86_64__)
47#define NE_STL_ARC_HCPU_X86_FAMILY 1
48#define NE_STL_ARC_HCPU_X86_64 1
49#define NE_STL_ARC_HCPU_64_BITS 1
50#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
51#elif defined(_M_IX86) || defined(__i386__)
52#define NE_STL_ARC_HCPU_X86_FAMILY 1
53#define NE_STL_ARC_HCPU_X86 1
54#define NE_STL_ARC_HCPU_32_BITS 1
55#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
56#elif defined(__s390x__)
57#define NE_STL_ARC_HCPU_S390_FAMILY 1
58#define NE_STL_ARC_HCPU_S390X 1
59#define NE_STL_ARC_HCPU_64_BITS 1
60#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
61#elif defined(__s390__)
62#define NE_STL_ARC_HCPU_S390_FAMILY 1
63#define NE_STL_ARC_HCPU_S390 1
64#define NE_STL_ARC_HCPU_31_BITS 1
65#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
66#elif (defined(__PPC64__) || defined(__PPC__)) && defined(__BIG_ENDIAN__)
67#define NE_STL_ARC_HCPU_PPC64_FAMILY 1
68#define NE_STL_ARC_HCPU_PPC64 1
69#define NE_STL_ARC_HCPU_64_BITS 1
70#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
71#elif defined(__PPC64__)
72#define NE_STL_ARC_HCPU_PPC64_FAMILY 1
73#define NE_STL_ARC_HCPU_PPC64 1
74#define NE_STL_ARC_HCPU_64_BITS 1
75#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
76#elif defined(__ARMEL__)
77#define NE_STL_ARC_HCPU_ARM_FAMILY 1
78#define NE_STL_ARC_HCPU_ARMEL 1
79#define NE_STL_ARC_HCPU_32_BITS 1
80#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
81#elif defined(__aarch64__) || defined(_M_ARM64)
82#define NE_STL_ARC_HCPU_ARM_FAMILY 1
83#define NE_STL_ARC_HCPU_ARM64 1
84#define NE_STL_ARC_HCPU_64_BITS 1
85#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
86#elif defined(__pnacl__) || defined(__asmjs__)
87#define NE_STL_ARC_HCPU_32_BITS 1
88#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
89#elif defined(__MIPSEL__)
91#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
92#define NE_STL_ARC_HCPU_MIPS64EL 1
93#define NE_STL_ARC_HCPU_64_BITS 1
94#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
96#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
97#define NE_STL_ARC_HCPU_MIPSEL 1
98#define NE_STL_ARC_HCPU_32_BITS 1
99#define NE_STL_ARC_HCPU_LITTLE_ENDIAN 1
101#elif defined(__MIPSEB__)
103#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
104#define NE_STL_ARC_HCPU_MIPS64 1
105#define NE_STL_ARC_HCPU_64_BITS 1
106#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
108#define NE_STL_ARC_HCPU_MIPS_FAMILY 1
109#define NE_STL_ARC_HCPU_MIPS 1
110#define NE_STL_ARC_HCPU_32_BITS 1
111#define NE_STL_ARC_HCPU_BIG_ENDIAN 1
114#error Please add support for your architecture in build/build_config.h
117#if defined(__clang__)
118#define NE_STL_USE_CLANG 1
119#elif defined(__GNUC__)
120#define NE_STL_USE_GCC 1
121#elif defined(_MSC_VER)
122#define NE_STL_USE_MSVC 1
123#define NE_STL_ENABLE_WINXP 0
126#if defined(NE_STL_USE_CLANG) || defined(NE_STL_USE_GCC)
128#define NE_STL_CPP_STANDARD __cplusplus
130#elif defined(NE_STL_USE_MSVC)
132#define NE_STL_CPP_STANDARD _MSVC_LANG
135#define NE_STL_STD_VER_11_No 201103L
136#define NE_STL_STD_VER_14_No 201402L
137#define NE_STL_STD_VER_17_No 201703L
138#define NE_STL_STD_VER_20_No 202002L
140#define NE_STL_CPP_STD_VER_11 11
141#define NE_STL_CPP_STD_VER_14 14
142#define NE_STL_CPP_STD_VER_17 17
143#define NE_STL_CPP_STD_VER_20 20
144#define NE_STL_CPP_STD_VER_21 21
145#if NE_STL_CPP_STANDARD <= NE_STL_STD_VER_11_No
146#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_11
147#elif NE_STL_CPP_STANDARD <= NE_STL_STD_VER_14_No
148#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_14
149#elif NE_STL_CPP_STANDARD <= NE_STL_STD_VER_17_No
150#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_17
151#elif NE_STL_CPP_STANDARD <= NE_STL_STD_VER_20_No
152#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_20
154#define NE_STL_CPP_STD_VER NE_STL_CPP_STD_VER_21