aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/platform_macros.h
diff options
context:
space:
mode:
authorGravatar Brian Silverman <bsilver16384@gmail.com>2015-09-09 18:30:55 -0400
committerGravatar Brian Silverman <bsilver16384@gmail.com>2015-09-09 18:37:33 -0400
commitff156e4863c36c08814bfda08e60ff58f6a6cefc (patch)
treeef7ef7e1247f74838af4e0778fb0369cde0bfc9b /src/google/protobuf/stubs/platform_macros.h
parente61ff47ac30f7ce7b06d789f18439d5142ac8c97 (diff)
Add atomics support for 32-bit PPC.
This was originally submitted as a patch on the Google Code issue tracker, but the original author didn't submit a pull request. They did, however, give permission for somebody else to do so. I cleaned up a few things myself and am now submitting it. I can't find any record of what the original patch was, but there is a copy of the discussion at <https://groups.google.com/forum/#!topic/protobuf/SMwF5fYHIi0>;. Fixes google/protobuf#581
Diffstat (limited to 'src/google/protobuf/stubs/platform_macros.h')
-rw-r--r--src/google/protobuf/stubs/platform_macros.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/platform_macros.h b/src/google/protobuf/stubs/platform_macros.h
index 9e0344d8..9edf34b2 100644
--- a/src/google/protobuf/stubs/platform_macros.h
+++ b/src/google/protobuf/stubs/platform_macros.h
@@ -73,6 +73,9 @@
#elif defined(_POWER)
#define GOOGLE_PROTOBUF_ARCH_POWER 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
+#elif defined(__PPC__)
+#define GOOGLE_PROTOBUF_ARCH_PPC 1
+#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
#elif defined(__GNUC__)
# if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
// We fallback to the generic Clang/GCC >= 4.7 implementation in atomicops.h