aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf
diff options
context:
space:
mode:
authorGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-08-07 19:08:05 +0000
committerGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-08-07 19:08:05 +0000
commit83964a9ab481a245274c6a13584df5038480037d (patch)
treeccee6b7e5cb4ba8fdf346c1b03e59fdc5573a75e /src/google/protobuf
parent7db9c098df1c73c6b35c23519d53ec3f92315db9 (diff)
1, Add comments for include<algorithm> we added for min/max on VS2013. 2, Add #if/#endif to wrap #undef
Diffstat (limited to 'src/google/protobuf')
-rw-r--r--src/google/protobuf/repeated_field.h1
-rw-r--r--src/google/protobuf/stubs/atomicops.h2
-rw-r--r--src/google/protobuf/wire_format_lite_inl.h1
3 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h
index d1b23121..00e83110 100644
--- a/src/google/protobuf/repeated_field.h
+++ b/src/google/protobuf/repeated_field.h
@@ -47,6 +47,7 @@
#define GOOGLE_PROTOBUF_REPEATED_FIELD_H__
#ifdef _MSC_VER
+// This is required for min/max on VS2013 only.
#include <algorithm>
#endif
diff --git a/src/google/protobuf/stubs/atomicops.h b/src/google/protobuf/stubs/atomicops.h
index c9d86c5f..08474904 100644
--- a/src/google/protobuf/stubs/atomicops.h
+++ b/src/google/protobuf/stubs/atomicops.h
@@ -120,7 +120,9 @@ Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
Atomic32 old_value,
Atomic32 new_value);
+#if defined(__MINGW32__) && defined(MemoryBarrier)
#undef MemoryBarrier
+#endif
void MemoryBarrier();
void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value);
void Acquire_Store(volatile Atomic32* ptr, Atomic32 value);
diff --git a/src/google/protobuf/wire_format_lite_inl.h b/src/google/protobuf/wire_format_lite_inl.h
index 2b5763ce..ca367f59 100644
--- a/src/google/protobuf/wire_format_lite_inl.h
+++ b/src/google/protobuf/wire_format_lite_inl.h
@@ -37,6 +37,7 @@
#define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
#ifdef _MSC_VER
+// This is required for min/max on VS2013 only.
#include <algorithm>
#endif