aboutsummaryrefslogtreecommitdiff
path: root/src/google
diff options
context:
space:
mode:
authorFeng Xiao <xiaofeng@google.com>2016-11-10 10:48:51 -0800
committerGitHub <noreply@github.com>2016-11-10 10:48:51 -0800
commit9f75c5aa851cd877fb0d93ccc31b8567a6706546 (patch)
tree4fb2868bdcfed6766f48bbfd0ff4430ae087ac96 /src/google
parentce5160b83b03c29fd27fc9f58370092b321bf2bc (diff)
parente75cf40e8f040068fba3c87f0d980ed475c5979b (diff)
downloadprotobuf-9f75c5aa851cd877fb0d93ccc31b8567a6706546.tar.gz
protobuf-9f75c5aa851cd877fb0d93ccc31b8567a6706546.tar.bz2
protobuf-9f75c5aa851cd877fb0d93ccc31b8567a6706546.zip
Merge pull request #2337 from sergiocampama/deprecation
Fixes deprecation warnings/errors on Xcode
Diffstat (limited to 'src/google')
-rw-r--r--src/google/protobuf/stubs/atomicops.h6
-rw-r--r--src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h (renamed from src/google/protobuf/stubs/atomicops_internals_pnacl.h)6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h
index 6a539153..10a71ed4 100644
--- a/src/google/protobuf/stubs/atomicops.h
+++ b/src/google/protobuf/stubs/atomicops.h
@@ -196,7 +196,11 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
// Apple.
#elif defined(GOOGLE_PROTOBUF_OS_APPLE)
+#if __has_feature(cxx_atomic) || _GNUC_VER >= 407
+#include <google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h>
+#else // __has_feature(cxx_atomic) || _GNUC_VER >= 407
#include <google/protobuf/stubs/atomicops_internals_macosx.h>
+#endif // __has_feature(cxx_atomic) || _GNUC_VER >= 407
// GCC.
#elif defined(__GNUC__)
@@ -217,7 +221,7 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
#elif defined(GOOGLE_PROTOBUF_ARCH_POWER)
#include <google/protobuf/stubs/atomicops_internals_power.h>
#elif defined(__native_client__)
-#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
+#include <google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h>
#elif defined(GOOGLE_PROTOBUF_ARCH_PPC)
#include <google/protobuf/stubs/atomicops_internals_ppc_gcc.h>
#elif (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
diff --git a/src/google/protobuf/stubs/atomicops_internals_pnacl.h b/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
index 3b314fd0..7bc584eb 100644
--- a/src/google/protobuf/stubs/atomicops_internals_pnacl.h
+++ b/src/google/protobuf/stubs/atomicops_internals_generic_c11_atomic.h
@@ -30,8 +30,8 @@
// This file is an internal atomic implementation, use atomicops.h instead.
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
+#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_C11_ATOMIC_H_
+#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_C11_ATOMIC_H_
#include <atomic>
@@ -228,4 +228,4 @@ inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
} // namespace protobuf
} // namespace google
-#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_PNACL_H_
+#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_C11_ATOMIC_H_