aboutsummaryrefslogtreecommitdiffstats
path: root/src/google/protobuf/stubs/atomicops.h
diff options
context:
space:
mode:
authorJeff Davidson <jpd@google.com>2015-01-20 13:02:58 -0800
committerJeff Davidson <jpd@google.com>2015-01-20 13:12:29 -0800
commitafb4b72037e3f13db208590fc782c4bc8e27f862 (patch)
tree204041a6b0ac0941d14faa2afe222d1b4b627db9 /src/google/protobuf/stubs/atomicops.h
parent80aff29bb2d37977a02c0a677721522d3467a4d9 (diff)
downloadexternal_protobuf-afb4b72037e3f13db208590fc782c4bc8e27f862.zip
external_protobuf-afb4b72037e3f13db208590fc782c4bc8e27f862.tar.gz
external_protobuf-afb4b72037e3f13db208590fc782c4bc8e27f862.tar.bz2
Upgrade protobuf library to v2.6.1.
The previous commit was actually between v2.6.0 and v2.6.1. This CL was created by generating a patch with: git format-patch edc5994525c79cd1919859a370837a6ff7c8e308..v2.6.1 and applying this patch to the tree. The patch was clean except for pom.xml, where the packaging type should have previously been changed from "jar" to "bundle". Reran ./configure && make -j12 check to regenerate configure script and makefiles. Change-Id: I817ff426c9a512cbda0246df5aee38f97e762dea
Diffstat (limited to 'src/google/protobuf/stubs/atomicops.h')
-rw-r--r--src/google/protobuf/stubs/atomicops.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h
index 76c026c..b1336e3 100644
--- a/src/google/protobuf/stubs/atomicops.h
+++ b/src/google/protobuf/stubs/atomicops.h
@@ -1,6 +1,6 @@
// Protocol Buffers - Google's data interchange format
// Copyright 2012 Google Inc. All rights reserved.
-// http://code.google.com/p/protobuf/
+// https://developers.google.com/protocol-buffers/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@@ -66,9 +66,10 @@ typedef int32 Atomic32;
#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
// We need to be able to go between Atomic64 and AtomicWord implicitly. This
// means Atomic64 and AtomicWord should be the same type on 64-bit.
-#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL)
+#if defined(__ILP32__) || defined(GOOGLE_PROTOBUF_OS_NACL) || defined(GOOGLE_PROTOBUF_ARCH_SPARC)
// NaCl's intptr_t is not actually 64-bits on 64-bit!
// http://code.google.com/p/nativeclient/issues/detail?id=1162
+// sparcv9's pointer type is 32bits
typedef int64 Atomic64;
#else
typedef intptr_t Atomic64;
@@ -174,6 +175,10 @@ Atomic64 Release_Load(volatile const Atomic64* ptr);
GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif
+// Solaris
+#elif defined(GOOGLE_PROTOBUF_OS_SOLARIS)
+#include <google/protobuf/stubs/atomicops_internals_solaris.h>
+
// Apple.
#elif defined(GOOGLE_PROTOBUF_OS_APPLE)
#include <google/protobuf/stubs/atomicops_internals_macosx.h>
@@ -194,6 +199,12 @@ GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#include <google/protobuf/stubs/atomicops_internals_pnacl.h>
#elif (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4))
#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
+#elif defined(__clang__)
+#if __has_extension(c_atomic)
+#include <google/protobuf/stubs/atomicops_internals_generic_gcc.h>
+#else
+GOOGLE_PROTOBUF_ATOMICOPS_ERROR
+#endif
#else
GOOGLE_PROTOBUF_ATOMICOPS_ERROR
#endif