aboutsummaryrefslogtreecommitdiffhomepage
path: root/vsprojects/config.h
diff options
context:
space:
mode:
authorGravatar Jisi Liu <jisi.liu@gmail.com>2015-03-01 21:02:22 -0800
committerGravatar Jisi Liu <jisi.liu@gmail.com>2015-03-01 21:02:22 -0800
commit4065a31644cf44fd84cc30491a61c4e59d0f2e2a (patch)
tree5f22d65035814665cc61cd1cd7b982356cfaa22d /vsprojects/config.h
parent14fe0c99bb226e111f6a3ddf0b70d911505871ff (diff)
Fix hash.h for MSVC and platforms without hash map/set support.
Change-Id: Ic0fdb52c17b9495c73b8ce15879531383a148585
Diffstat (limited to 'vsprojects/config.h')
-rwxr-xr-x[-rw-r--r--]vsprojects/config.h29
1 files changed, 10 insertions, 19 deletions
diff --git a/vsprojects/config.h b/vsprojects/config.h
index 2c64450a..a93bb033 100644..100755
--- a/vsprojects/config.h
+++ b/vsprojects/config.h
@@ -1,28 +1,19 @@
/* protobuf config.h for MSVC. On other platforms, this is generated
* automatically by autoheader / autoconf / configure. */
-/* the location of <hash_map> */
-#define HASH_MAP_H <hash_map>
+#include <google/protobuf/stubs/pbconfig.h>
-/* the namespace of hash_map/hash_set */
-// Apparently Microsoft decided to move hash_map *back* to the std namespace
-// in MSVC 2010:
-// http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx
-// TODO(kenton): Use unordered_map instead, which is available in MSVC 2010.
-#if _MSC_VER < 1310 || _MSC_VER >= 1600
-#define HASH_NAMESPACE std
-#else
-#define HASH_NAMESPACE stdext
-#endif
-
-/* the location of <hash_set> */
-#define HASH_SET_H <hash_set>
+#define HASH_MAP_H GOOGLE_PROTOBUF_HASH_MAP_H
+#define HASH_NAMESPACE GOOGLE_PROTOBUF_HASH_NAMESPACE
+#define HASH_SET_H GOOGLE_PROTOBUF_HASH_SET_H
-/* define if the compiler has hash_map */
-#define HAVE_HASH_MAP 1
+#ifdef GOOGLE_PROTOBUF_HAVE_HASH_MAP
+#define HAVE_HASH_MAP GOOGLE_PROTOBUF_HAVE_HASH_MAP
+#endif
-/* define if the compiler has hash_set */
-#define HAVE_HASH_SET 1
+#ifdef GOOGLE_PROTOBUF_HAVE_HASH_SET
+#define HAVE_HASH_SET GOOGLE_PROTOBUF_HAVE_HASH_SET
+#endif
/* define if you want to use zlib. See readme.txt for additional
* requirements. */