aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/platform_macros.h
diff options
context:
space:
mode:
authorGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-08-25 20:17:53 +0000
committerGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-08-25 20:17:53 +0000
commit1eba9d9c7424235b1a6dcd866fcd06d12e08a7f3 (patch)
treeb2a894794db1f6147214e356c20f754e270f4e7f /src/google/protobuf/stubs/platform_macros.h
parent786379af4766fa7ec22b51862ba6e84156b1f9cb (diff)
merge tags/2.6.0 into trunk
Diffstat (limited to 'src/google/protobuf/stubs/platform_macros.h')
-rw-r--r--src/google/protobuf/stubs/platform_macros.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index 30604782..1705b416 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -65,6 +65,14 @@
#elif defined(__ppc__)
#define GOOGLE_PROTOBUF_ARCH_PPC 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+#elif defined(__GNUC__) && \
+ (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
+// We fallback to the generic GCC >= 4.7 implementation in atomicops.h
+# if __LP64__
+# define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+# else
+# define GOOGLE_PROTOBUF_ARCH_32_BIT 1
+# endif
#else
#error Host architecture was not detected as supported by protobuf
#endif