summaryrefslogtreecommitdiffstats
path: root/third_party/protobuf
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 09:41:39 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-08-14 09:41:39 +0000
commit1d39d450aabd02fa803b465148fb7cdf38733857 (patch)
treeee7756ba66e6ba4a9c961ea8725337b7f28980bb /third_party/protobuf
parent41c7e59ef2d8c96d200745a3229a7063e1cab115 (diff)
downloadchromium_src-1d39d450aabd02fa803b465148fb7cdf38733857.zip
chromium_src-1d39d450aabd02fa803b465148fb7cdf38733857.tar.gz
chromium_src-1d39d450aabd02fa803b465148fb7cdf38733857.tar.bz2
Re-roll the patch from https://code.google.com/p/protobuf/source/detail?r=430,
which has been accidentally reverted during the protobuf merge in r216961 BUG=272212 TBR=mark@chromium.org,brettw@chromium.org Review URL: https://codereview.chromium.org/23068004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217510 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/protobuf')
-rw-r--r--third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h4
-rw-r--r--third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h13
2 files changed, 9 insertions, 8 deletions
diff --git a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
index 8d9a726..e9d8679 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
+++ b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h
@@ -44,7 +44,7 @@
// On LP64 platforms, AtomicWord and Atomic64 are both always long,
// so this problem doesn't occur.
-#if !defined(GOOGLE_PROTOBUF_HOST_ARCH_64_BIT)
+#if !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
namespace google {
namespace protobuf {
@@ -117,6 +117,6 @@ inline AtomicWord Release_Load(volatile const AtomicWord* ptr) {
} // namespace protobuf
} // namespace google
-#endif // !defined(GOOGLE_PROTOBUF_HOST_ARCH_64_BIT)
+#endif // !defined(GOOGLE_PROTOBUF_ARCH_64_BIT)
#endif // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_ATOMICWORD_COMPAT_H_
diff --git a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h
index 9af6d636..f9b7581 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h
+++ b/third_party/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h
@@ -136,7 +136,7 @@ inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 prev_value;
do {
if (OSAtomicCompareAndSwap64(old_value, new_value,
- const_cast<Atomic64*>(ptr))) {
+ reinterpret_cast<volatile int64_t*>(ptr))) {
return old_value;
}
prev_value = *ptr;
@@ -150,18 +150,19 @@ inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
do {
old_value = *ptr;
} while (!OSAtomicCompareAndSwap64(old_value, new_value,
- const_cast<Atomic64*>(ptr)));
+ reinterpret_cast<volatile int64_t*>(ptr)));
return old_value;
}
inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
- return OSAtomicAdd64(increment, const_cast<Atomic64*>(ptr));
+ return OSAtomicAdd64(increment, reinterpret_cast<volatile int64_t*>(ptr));
}
inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
Atomic64 increment) {
- return OSAtomicAdd64Barrier(increment, const_cast<Atomic64*>(ptr));
+ return OSAtomicAdd64Barrier(increment,
+ reinterpret_cast<volatile int64_t*>(ptr));
}
inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
@@ -169,8 +170,8 @@ inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
Atomic64 new_value) {
Atomic64 prev_value;
do {
- if (OSAtomicCompareAndSwap64Barrier(old_value, new_value,
- const_cast<Atomic64*>(ptr))) {
+ if (OSAtomicCompareAndSwap64Barrier(
+ old_value, new_value, reinterpret_cast<volatile int64_t*>(ptr))) {
return old_value;
}
prev_value = *ptr;