aboutsummaryrefslogtreecommitdiff
path: root/vsprojects
diff options
context:
space:
mode:
authorJisi Liu <jisi.liu@gmail.com>2015-02-25 15:28:44 -0800
committerJisi Liu <jisi.liu@gmail.com>2015-02-25 15:56:58 -0800
commitdf184fba00acc7d4aa7b9d64693c53c815a64eda (patch)
tree43fd810851d46f16d54f5f0aa6a5017115c0b707 /vsprojects
parent581a5266ee592eaed28a24d4aa58c59d4d0135e8 (diff)
downloadprotobuf-df184fba00acc7d4aa7b9d64693c53c815a64eda.tar.gz
protobuf-df184fba00acc7d4aa7b9d64693c53c815a64eda.tar.bz2
protobuf-df184fba00acc7d4aa7b9d64693c53c815a64eda.zip
Make maps fields work on installed C++ protobufs.
Change-Id: Id937e25bbb35968ee76c92bd4a8ce6247408c443
Diffstat (limited to 'vsprojects')
-rwxr-xr-xvsprojects/extract_includes.bat2
-rw-r--r--vsprojects/google/protobuf/stubs/pbconfig.h29
-rw-r--r--vsprojects/libprotobuf-lite.vcproj4
-rw-r--r--vsprojects/libprotobuf.vcproj4
4 files changed, 39 insertions, 0 deletions
diff --git a/vsprojects/extract_includes.bat b/vsprojects/extract_includes.bat
index 3f902e8e..e9d762c6 100755
--- a/vsprojects/extract_includes.bat
+++ b/vsprojects/extract_includes.bat
@@ -72,6 +72,7 @@ copy ..\src\google\protobuf\stubs\fastmem.h include\google\protobuf\stubs\fastme
copy ..\src\google\protobuf\stubs\once.h include\google\protobuf\stubs\once.h
copy ..\src\google\protobuf\stubs\platform_macros.h include\google\protobuf\stubs\platform_macros.h
copy ..\src\google\protobuf\stubs\singleton.h include\google\protobuf\stubs\singleton.h
+copy ..\src\google\protobuf\stubs\hash.h include\google\protobuf\stubs\hash.h
copy ..\src\google\protobuf\stubs\stl_util.h include\google\protobuf\stubs\stl_util.h
copy ..\src\google\protobuf\stubs\template_util.h include\google\protobuf\stubs\template_util.h
copy ..\src\google\protobuf\stubs\type_traits.h include\google\protobuf\stubs\type_traits.h
@@ -80,3 +81,4 @@ copy ..\src\google\protobuf\unknown_field_set.h include\google\protobuf\unknown_
copy ..\src\google\protobuf\wire_format.h include\google\protobuf\wire_format.h
copy ..\src\google\protobuf\wire_format_lite.h include\google\protobuf\wire_format_lite.h
copy ..\src\google\protobuf\wire_format_lite_inl.h include\google\protobuf\wire_format_lite_inl.h
+copy google\protobuf\stubs\pbconfig.h include\google\protobuf\stubs\pbconfig.h
diff --git a/vsprojects/google/protobuf/stubs/pbconfig.h b/vsprojects/google/protobuf/stubs/pbconfig.h
new file mode 100644
index 00000000..c49d26b0
--- /dev/null
+++ b/vsprojects/google/protobuf/stubs/pbconfig.h
@@ -0,0 +1,29 @@
+/* protobuf config.h for MSVC. On other platforms, this is generated
+ * automatically by autoheader / autoconf / configure. */
+
+/* the location of <hash_map> */
+#define GOOGLE_PROTOBUF_HASH_MAP_H <hash_map>
+
+/* 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 GOOGLE_PROTOBUF_HASH_NAMESPACE std
+#else
+#define GOOGLE_PROTOBUF_HASH_NAMESPACE stdext
+#endif
+
+/* the location of <hash_set> */
+#define GOOGLE_PROTOBUF_HASH_SET_H <hash_set>
+
+/* define if the compiler has hash_map */
+#define GOOGLE_PROTOBUF_HAVE_HASH_MAP 1
+
+/* define if the compiler has hash_set */
+#define GOOGLE_PROTOBUF_HAVE_HASH_SET 1
+
+/* define if you want to use zlib. See readme.txt for additional
+ * requirements. */
+// #define HAVE_ZLIB 1
diff --git a/vsprojects/libprotobuf-lite.vcproj b/vsprojects/libprotobuf-lite.vcproj
index 09eca4d8..339d03fa 100644
--- a/vsprojects/libprotobuf-lite.vcproj
+++ b/vsprojects/libprotobuf-lite.vcproj
@@ -164,6 +164,10 @@
>
</File>
<File
+ RelativePath=".\google\protobuf\stubs\pbconfig.h"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\extension_set.h"
>
</File>
diff --git a/vsprojects/libprotobuf.vcproj b/vsprojects/libprotobuf.vcproj
index 095d3948..6712647d 100644
--- a/vsprojects/libprotobuf.vcproj
+++ b/vsprojects/libprotobuf.vcproj
@@ -164,6 +164,10 @@
>
</File>
<File
+ RelativePath=".\google\protobuf\stubs\pbconfig.h"
+ >
+ </File>
+ <File
RelativePath="..\src\google\protobuf\descriptor.h"
>
</File>