aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/stubs/hash.h
diff options
context:
space:
mode:
authorGravatar Adam Cozzette <acozzette@google.com>2016-12-12 09:40:30 -0800
committerGravatar Adam Cozzette <acozzette@google.com>2016-12-13 11:00:12 -0800
commit5587562a70cc115bf9ef921cf2080c12a241ad2c (patch)
treeffb6e6655d34774aa9de1cee07fe1941f4ba3019 /src/google/protobuf/stubs/hash.h
parent9d709f446f18b672edff81ee2d3f9d6516465d8c (diff)
Removed Android-specific code from stubs/hash.h
This #ifdef in hash.h causes us to give up on finding a hash function on Android, when there do seem to be hash functions available in practice. I also had to tweak a macro in map.h that was disabling on Android an allocator construct() method that we need.
Diffstat (limited to 'src/google/protobuf/stubs/hash.h')
-rw-r--r--src/google/protobuf/stubs/hash.h11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/google/protobuf/stubs/hash.h b/src/google/protobuf/stubs/hash.h
index 4eac7d5d..bf0b88b4 100644
--- a/src/google/protobuf/stubs/hash.h
+++ b/src/google/protobuf/stubs/hash.h
@@ -41,15 +41,10 @@
#define GOOGLE_PROTOBUF_HAVE_HASH_MAP 1
#define GOOGLE_PROTOBUF_HAVE_HASH_SET 1
-// Android
-#if defined(__ANDROID__)
-# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
-# undef GOOGLE_PROTOBUF_HAVE_HASH_MAP
-
// Use C++11 unordered_{map|set} if available.
-#elif ((_LIBCPP_STD_VER >= 11) || \
- (((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \
- (__GLIBCXX__ > 20090421)))
+#if ((_LIBCPP_STD_VER >= 11) || \
+ (((__cplusplus >= 201103L) || defined(__GXX_EXPERIMENTAL_CXX0X)) && \
+ (__GLIBCXX__ > 20090421)))
# define GOOGLE_PROTOBUF_HAS_CXX11_HASH
// For XCode >= 4.6: the compiler is clang with libc++.