Go to the documentation of this file.
31 #ifndef GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
32 #define GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
34 #define GOOGLE_PROTOBUF_PLATFORM_ERROR \
35 #error "Host platform was not detected as supported by protobuf"
41 #if defined(_M_X64) || defined(__x86_64__)
42 #define GOOGLE_PROTOBUF_ARCH_X64 1
43 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
44 #elif defined(_M_IX86) || defined(__i386__)
45 #define GOOGLE_PROTOBUF_ARCH_IA32 1
46 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
47 #elif defined(__QNX__)
48 #define GOOGLE_PROTOBUF_ARCH_ARM_QNX 1
49 #if defined(__aarch64__)
50 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
52 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
54 #elif defined(_M_ARM) || defined(__ARMEL__)
55 #define GOOGLE_PROTOBUF_ARCH_ARM 1
56 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
57 #elif defined(_M_ARM64)
58 #define GOOGLE_PROTOBUF_ARCH_ARM 1
59 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
60 #elif defined(__aarch64__)
61 #define GOOGLE_PROTOBUF_ARCH_AARCH64 1
62 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
63 #elif defined(__mips__)
65 #define GOOGLE_PROTOBUF_ARCH_MIPS64 1
66 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
68 #define GOOGLE_PROTOBUF_ARCH_MIPS 1
69 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
71 #elif defined(__pnacl__)
72 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
74 #define GOOGLE_PROTOBUF_ARCH_SPARC 1
75 #if defined(__sparc_v9__) || defined(__sparcv9) || defined(__arch64__)
76 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
78 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
80 #elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__)
81 #define GOOGLE_PROTOBUF_ARCH_POWER 1
82 #define GOOGLE_PROTOBUF_ARCH_64_BIT 1
83 #elif defined(__PPC__)
84 #define GOOGLE_PROTOBUF_ARCH_PPC 1
85 #define GOOGLE_PROTOBUF_ARCH_32_BIT 1
86 #elif defined(__GNUC__)
87 # if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
89 # elif defined(__clang__)
90 # if !__has_extension(c_atomic)
96 # define GOOGLE_PROTOBUF_ARCH_64_BIT 1
98 # define GOOGLE_PROTOBUF_ARCH_32_BIT 1
104 #if defined(__APPLE__)
105 #define GOOGLE_PROTOBUF_OS_APPLE
106 #include <Availability.h>
107 #include <TargetConditionals.h>
109 #define GOOGLE_PROTOBUF_OS_IPHONE
111 #elif defined(__EMSCRIPTEN__)
112 #define GOOGLE_PROTOBUF_OS_EMSCRIPTEN
113 #elif defined(__native_client__)
114 #define GOOGLE_PROTOBUF_OS_NACL
116 #define GOOGLE_PROTOBUF_OS_SOLARIS
118 #define GOOGLE_PROTOBUF_OS_AIX
119 #elif defined(__ANDROID__)
120 #define GOOGLE_PROTOBUF_OS_ANDROID
123 #undef GOOGLE_PROTOBUF_PLATFORM_ERROR
125 #if defined(GOOGLE_PROTOBUF_OS_ANDROID) || defined(GOOGLE_PROTOBUF_OS_IPHONE) || defined(__OpenBSD__)
130 #define GOOGLE_PROTOBUF_NO_THREADLOCAL
133 #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
135 #define GOOGLE_PROTOBUF_NO_THREADLOCAL
138 #endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:43