diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-06-15 21:42:57 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-06-17 11:19:46 -0700 |
commit | 818c5eee08840355d70d2f3bdf1a2f17986a5e70 (patch) | |
tree | e6db0b1344385f8c48820c58d7297f653bff39f7 /src/google/protobuf/stubs/stringpiece.h | |
parent | e96ff30120a3834f7d1e31e43e591bf7cfbd731f (diff) | |
download | protobuf-818c5eee08840355d70d2f3bdf1a2f17986a5e70.tar.gz protobuf-818c5eee08840355d70d2f3bdf1a2f17986a5e70.tar.bz2 protobuf-818c5eee08840355d70d2f3bdf1a2f17986a5e70.zip |
Fix broken builds.
Diffstat (limited to 'src/google/protobuf/stubs/stringpiece.h')
-rw-r--r-- | src/google/protobuf/stubs/stringpiece.h | 5 |
1 files changed, 4 insertions, 1 deletions
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<size_t>( std::numeric_limits<stringpiece_ssize_type>::max())) { // Some people grep for this message in logs |