1, Add comments for include<algorithm> we added for min/max on VS2013. 2, Add #if/#endif to wrap #undef

This commit is contained in:
jieluo@google.com 2014-08-07 19:08:05 +00:00
parent 7db9c098df
commit 83964a9ab4
3 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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);

View file

@ -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