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 #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 #endif