aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/common.h
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2014-12-04 17:30:58 -0800
committerGravatar Feng Xiao <xfxyjwf@gmail.com>2014-12-04 17:30:58 -0800
commitd77877808fc9f00c3570353717d9659f8994ffc2 (patch)
treec26019d265d2409595b6bfcd7026cd5eb9bf7b11 /src/google/protobuf/stubs/common.h
parent6a949cda379c0ee38cce1a926e2982d45f53dfce (diff)
Fix thread local annotatoin and add back type traits is_convertable for MSVC
Diffstat (limited to 'src/google/protobuf/stubs/common.h')
-rw-r--r--src/google/protobuf/stubs/common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/common.h b/src/google/protobuf/stubs/common.h
index 17dd6671..c3f735a2 100644
--- a/src/google/protobuf/stubs/common.h
+++ b/src/google/protobuf/stubs/common.h
@@ -314,6 +314,12 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) {
}
#endif
+#if defined(_MSC_VER)
+#define GOOGLE_THREAD_LOCAL __declspec(thread)
+#else
+#define GOOGLE_THREAD_LOCAL __thread
+#endif
+
// ===================================================================
// from google3/base/basictypes.h