From 6011d7ca4c3207661ca247be4a39f861d93b8065 Mon Sep 17 00:00:00 2001 From: Matt Hauck Date: Wed, 1 Mar 2017 10:45:43 -0800 Subject: 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 --- src/google/protobuf/stubs/hash.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/google/protobuf/stubs/hash.h') 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: -- cgit v1.2.3