Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/pbconfig.h

Issue 1322483002: Revert https://codereview.chromium.org/1291903002 (protobuf roll). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/protobuf/src/google/protobuf/stubs/pbconfig.h
diff --git a/third_party/protobuf/src/google/protobuf/stubs/pbconfig.h b/third_party/protobuf/src/google/protobuf/stubs/pbconfig.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c0cfbe8a9e82409a232feacedca30d2afee42ea
--- /dev/null
+++ b/third_party/protobuf/src/google/protobuf/stubs/pbconfig.h
@@ -0,0 +1,74 @@
+/* Modified for Chromium to support stlport and libc++ adaptively */
+/* protobuf config.h for MSVC. On other platforms, this is generated
+ * automatically by autoheader / autoconf / configure. */
+
+// NOTE: if you add new macros in this file manually, please propagate the macro
+// to vsprojects/config.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
+// 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
+#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
+#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
+#else
+/* the name of <hash_map> */
+#if defined(_LIBCPP_VERSION)
+#define GOOGLE_PROTOBUF_HASH_MAP_CLASS unordered_map
+#else
+#define GOOGLE_PROTOBUF_HASH_MAP_CLASS hash_map
+#endif
+
+/* the location of <unordered_map> or <hash_map> */
+#if defined(USE_STLPORT)
+#define GOOGLE_PROTOBUF_HASH_MAP_H <hash_map>
+#elif defined(_LIBCPP_VERSION)
+#define GOOGLE_PROTOBUF_HASH_MAP_H <unordered_map>
+#else
+#define GOOGLE_PROTOBUF_HASH_MAP_H <ext/hash_map>
+#endif
+
+/* the namespace of hash_map/hash_set */
+#if defined(USE_STLPORT) || defined(_LIBCPP_VERSION)
+#define GOOGLE_PROTOBUF_HASH_NAMESPACE std
+#else
+#define GOOGLE_PROTOBUF_HASH_NAMESPACE __gnu_cxx
+#endif
+
+/* the name of <hash_set> */
+#if defined(_LIBCPP_VERSION)
+#define GOOGLE_PROTOBUF_HASH_SET_CLASS unordered_set
+#else
+#define GOOGLE_PROTOBUF_HASH_SET_CLASS hash_set
+#endif
+
+/* the location of <unordered_set> or <hash_set> */
+#if defined(USE_STLPORT)
+#define GOOGLE_PROTOBUF_HASH_SET_H <hash_set>
+#elif defined(_LIBCPP_VERSION)
+#define GOOGLE_PROTOBUF_HASH_SET_H <unordered_set>
+#else
+#define GOOGLE_PROTOBUF_HASH_SET_H <ext/hash_set>
+#endif
+
+#endif // _MSC_VER >= 1600
+
+/* the location of <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

Powered by Google App Engine
This is Rietveld 408576698