aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/hash.h
diff options
context:
space:
mode:
authorGravatar Matt Hauck <matthauck@gmail.com>2017-03-01 10:45:43 -0800
committerGravatar Paul Yang <TeBoring@users.noreply.github.com>2017-03-01 10:45:43 -0800
commit6011d7ca4c3207661ca247be4a39f861d93b8065 (patch)
treebd86de2daba8d2b6422483d300136fca579a206c /src/google/protobuf/stubs/hash.h
parent25ecd559cca5da3e30ad219d13b3ec9c19f6718e (diff)
Fix gcc 4.1 build (#1035) (#1913)
* Fix gcc 4.1.2 compilation of map_field_inl.h Fixes "error: object missing in reference to '...'" errors from #1035 * Disable 64-bit map keys on gcc <= 4.1 * Add missing case statements
Diffstat (limited to 'src/google/protobuf/stubs/hash.h')
-rw-r--r--src/google/protobuf/stubs/hash.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h
index bf0b88b4..be998b29 100644
--- a/src/google/protobuf/stubs/hash.h
+++ b/src/google/protobuf/stubs/hash.h
@@ -40,6 +40,7 @@
#define GOOGLE_PROTOBUF_HAVE_HASH_MAP 1
#define GOOGLE_PROTOBUF_HAVE_HASH_SET 1
+#define GOOGLE_PROTOBUF_HAVE_64BIT_HASH 1
// Use C++11 unordered_{map|set} if available.
#if ((_LIBCPP_STD_VER >= 11) || \
@@ -92,6 +93,10 @@
# define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
# endif
+# if __GNUC__ == 4 && __GNUC__MINOR__ <= 1
+# undef GOOGLE_PROTOBUF_HAVE_64BIT_HASH
+# endif
+
// Version checks for MSC.
// Apparently Microsoft decided to move hash_map *back* to the std namespace in
// MSVC 2010: