From 818c5eee08840355d70d2f3bdf1a2f17986a5e70 Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 15 Jun 2015 21:42:57 -0700 Subject: Fix broken builds. --- src/google/protobuf/stubs/stringpiece.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/google/protobuf/stubs/stringpiece.h') diff --git a/src/google/protobuf/stubs/stringpiece.h b/src/google/protobuf/stubs/stringpiece.h index 5d4d5fe4..353a60d3 100644 --- a/src/google/protobuf/stubs/stringpiece.h +++ b/src/google/protobuf/stubs/stringpiece.h @@ -174,7 +174,7 @@ typedef string::difference_type stringpiece_ssize_type; #define STRINGPIECE_CHECK_SIZE 0 #endif -class StringPiece { +class LIBPROTOBUF_EXPORT StringPiece { private: const char* ptr_; stringpiece_ssize_type length_; @@ -183,6 +183,9 @@ class StringPiece { // sizeof(stringpiece_ssize_type) may be smaller than sizeof(size_t). static stringpiece_ssize_type CheckedSsizeTFromSizeT(size_t size) { #if STRINGPIECE_CHECK_SIZE > 0 +#ifdef max +#undef max +#endif if (size > static_cast( std::numeric_limits::max())) { // Some people grep for this message in logs -- cgit v1.2.3