15 #if !defined(OPENNURBS_SYSTEM_RUNTIME_INC_) 16 #define OPENNURBS_SYSTEM_RUNTIME_INC_ 21 // Determines the runtime environment where the code is executed.
30 // BEGIN - ON_RUNTIME_APPLE / ON_RUNTIME_WIN / ON_RUNTIME_ANDROID defines
32 // ON_RUNTIME_* specifies the runtime C/C++ SDK being used
33 // At most one the ON_RUNTIME_* should be defined
35 // ON_RUNTIME_APPLE / ON_RUNTIME_WIN / ON_RUNTIME_ANDROID
38 #if (defined(__APPLE__) || defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) || defined(__IOS__)) 40 #if !defined(ON_RUNTIME_APPLE) 41 #define ON_RUNTIME_APPLE 44 #elif defined(_WIN32) || defined(WIN32) || defined(_WIN64) || defined(WIN64) || defined(WINDOWS) || defined(_WINDOWS_) || defined(__WINDOWS__) 46 #if !defined(ON_RUNTIME_WIN) 47 #define ON_RUNTIME_WIN 50 #elif defined(__ANDROID__) 52 #if !defined(ON_RUNTIME_ANDROID) 53 #define ON_RUNTIME_ANDROID 67 // BEGIN - Additional platform defines
69 // ON_64BIT_RUNTIME / ON_32BIT_RUNTIME
70 // ON_LITTLE_ENDIAN / ON_BIG_ENDIAN
72 // ON_RUNTIME_<PLATFORM>_<SUBPLATFORM>
75 #if defined(ON_RUNTIME_APPLE) 77 #if (defined(TARGET_OS_IPHONE) || defined(TARGET_IPHONE_SIMULATOR) || defined(__IOS__)) 78 #define ON_RUNTIME_APPLE_IOS 80 #define ON_RUNTIME_APPLE_MACOS 83 #if (defined(__LP64__) || defined(__ppc64__)) 84 #define ON_64BIT_RUNTIME 85 #elif defined(__LP32__) 86 #define ON_32BIT_RUNTIME 88 #error Add code to detect sizeof pointer on this Apple platform 91 #define ON_SIZEOF_WCHAR_T 4 93 #if (defined(__ppc__) || defined(__ppc64__)) 96 #define ON_LITTLE_ENDIAN 99 #elif defined(ON_RUNTIME_WIN) 101 #define ON_SIZEOF_WCHAR_T 2 103 #if defined(WINDOWS_PHONE) 104 #define ON_RUNTIME_WIN_MOBILE 106 #define ON_RUNTIME_WIN_WINOS 109 #if defined(_M_X64) || defined(_WIN64) 110 #define ON_64BIT_RUNTIME 111 #elif defined(_M_X86) || defined(_WIN32) 112 #define ON_32BIT_RUNTIME 114 #error Add code to detect sizeof pointer on this Windows platform 117 #if !defined(ON_LITTLE_ENDIAN) 118 #if (defined(_M_X64) || defined(_M_IX86) || defined (__i386__) || defined( __x86_64__ )) 119 #define ON_LITTLE_ENDIAN 123 #elif defined(ON_RUNTIME_ANDROID) 125 #if !defined(ON_SIZEOF_WCHAR_T) 126 #define ON_SIZEOF_WCHAR_T 4 131 #if !defined(ON_64BIT_RUNTIME) && !defined(ON_32BIT_RUNTIME) 133 #if (defined(_M_X64) || defined(__LP64__) || defined(__ppc64__)) 134 #define ON_64BIT_RUNTIME 135 #elif (defined(_M_X86) || defined(__LP32__)) 136 #define ON_32BIT_RUNTIME 140 #if defined(ON_64BIT_RUNTIME) && defined(ON_32BIT_RUNTIME) 141 #error Exactly one of ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined. 144 #if !defined(ON_64BIT_RUNTIME) && !defined(ON_32BIT_RUNTIME) 145 #error Exactly one of ON_64BIT_RUNTIME or ON_32BIT_RUNTIME must be defined. 148 #if defined(ON_BIG_ENDIAN) && defined(ON_LITTLE_ENDIAN) 149 #error Exactly one of ON_LITTLE_ENDIAN or ON_BIG_ENDIAN should be defined. 152 #if !defined(ON_BIG_ENDIAN) && !defined(ON_LITTLE_ENDIAN) 153 #error Exactly one of ON_LITTLE_ENDIAN or ON_BIG_ENDIAN should be defined.