aboutsummaryrefslogtreecommitdiff
path: root/vsprojects
diff options
context:
space:
mode:
authorunknown <teboring@TEBORING1-W.ad.corp.google.com>2015-05-27 11:45:32 -0700
committerBo Yang <teboring@google.com>2015-05-27 17:33:10 -0700
commitca1c252923021306b7fbc488d33f6a6a89df59cf (patch)
tree441c20dd9dff539e645f3dc29c697efb632e0d34 /vsprojects
parentb11d6fe515873591907bcce592ed86757c3d7cf3 (diff)
downloadprotobuf-ca1c252923021306b7fbc488d33f6a6a89df59cf.tar.gz
protobuf-ca1c252923021306b7fbc488d33f6a6a89df59cf.tar.bz2
protobuf-ca1c252923021306b7fbc488d33f6a6a89df59cf.zip
Fixes on visual studio 2008
Diffstat (limited to 'vsprojects')
-rwxr-xr-xvsprojects/google/protobuf/stubs/pbconfig.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/vsprojects/google/protobuf/stubs/pbconfig.h b/vsprojects/google/protobuf/stubs/pbconfig.h
index 18250a22..9629f2e4 100755
--- a/vsprojects/google/protobuf/stubs/pbconfig.h
+++ b/vsprojects/google/protobuf/stubs/pbconfig.h
@@ -10,24 +10,34 @@
// http://blogs.msdn.com/vcblog/archive/2009/05/25/stl-breaking-changes-in-visual-studio-2010-beta-1.aspx
// And.. they are moved back to stdext in MSVC 2013 (haven't checked 2012). That
// said, use unordered_map for MSVC 2010 and beyond is our safest bet.
-#if _MSC_VER >= 1600
+#if _MSC_VER >= 1600 // Since Visual Studio 2010
#define GOOGLE_PROTOBUF_HASH_NAMESPACE std
#define GOOGLE_PROTOBUF_HASH_MAP_H <unordered_map>
#define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map
#define GOOGLE_PROTOBUF_HASH_SET_H <unordered_set>
#define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set
+#define GOOGLE_PROTOBUF_HASH_COMPARE std::hash_compare
+#elif _MSC_VER >= 1500 // Since Visual Studio 2008
+#define GOOGLE_PROTOBUF_HASH_NAMESPACE std::tr1
+#define GOOGLE_PROTOBUF_HASH_MAP_H <unordered_map>
+#define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map
+#define GOOGLE_PROTOBUF_HASH_SET_H <unordered_set>
+#define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set
+#define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare
#elif _MSC_VER >= 1310
#define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext
#define GOOGLE_PROTOBUF_HASH_MAP_H <hash_map>
#define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
#define GOOGLE_PROTOBUF_HASH_SET_H <hash_set>
#define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+#define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare
#else
#define GOOGLE_PROTOBUF_HASH_NAMESPACE std
#define GOOGLE_PROTOBUF_HASH_MAP_H <hash_map>
#define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
#define GOOGLE_PROTOBUF_HASH_SET_H <hash_set>
#define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+#define GOOGLE_PROTOBUF_HASH_COMPARE stdext::hash_compare
#endif
/* the location of <hash_set> */