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

Unified Diff: third_party/protobuf/patches/0004-fix-integer-types-and-shared-library-exports.patch

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 4 years 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/patches/0004-fix-integer-types-and-shared-library-exports.patch
diff --git a/third_party/protobuf/patches/0004-fix-integer-types-and-shared-library-exports.patch b/third_party/protobuf/patches/0004-fix-integer-types-and-shared-library-exports.patch
index 419ca0df1ba4142c02cb58797758f226a4f81286..084555332f3d60b7520813be04ef98f5ae446ac1 100644
--- a/third_party/protobuf/patches/0004-fix-integer-types-and-shared-library-exports.patch
+++ b/third_party/protobuf/patches/0004-fix-integer-types-and-shared-library-exports.patch
@@ -46,15 +46,39 @@
#define LIBPROTOBUF_EXPORT
#define LIBPROTOC_EXPORT
#endif
-@@ -149,9 +149,9 @@
+@@ -109,15 +125,15 @@
+ typedef unsigned __int32 uint32;
+ typedef unsigned __int64 uint64;
+ #else
+-typedef signed char int8;
+-typedef short int16;
+-typedef int int32;
+-typedef long long int64;
+-
+-typedef unsigned char uint8;
+-typedef unsigned short uint16;
+-typedef unsigned int uint32;
+-typedef unsigned long long uint64;
++typedef int8_t int8;
++typedef int16_t int16;
++typedef int32_t int32;
++typedef int64_t int64;
++
++typedef uint8_t uint8;
++typedef uint16_t uint16;
++typedef uint32_t uint32;
++typedef uint64_t uint64;
+ #endif
+
+ // long long macros to be used because gcc and vc++ use different suffixes,
+@@ -131,8 +147,8 @@
+ #define GOOGLE_ULONGLONG(x) x##UI64
#define GOOGLE_LL_FORMAT "I64" // As in printf("%I64d", ...)
#else
- // By long long, we actually mean int64.
-#define GOOGLE_LONGLONG(x) x##LL
-#define GOOGLE_ULONGLONG(x) x##ULL
+#define GOOGLE_LONGLONG(x) INT64_C(x)
+#define GOOGLE_ULONGLONG(x) UINT64_C(x)
- // Used to format real long long integers.
#define GOOGLE_LL_FORMAT "ll" // As in "%lld". Note that "q" is poor form also.
#endif

Powered by Google App Engine
This is Rietveld 408576698