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

Side by Side Diff: third_party/protobuf/patches/01_build_fixes.patch

Issue 1291903002: Pull new version of protobuf sources. (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 unified diff | Download patch
OLDNEW
(Empty)
1 diff --git a/third_party/protobuf/README.chromium b/third_party/protobuf/README. chromium
2 index d845dfa..a3fb161 100644
3 --- a/third_party/protobuf/README.chromium
4 +++ b/third_party/protobuf/README.chromium
5 @@ -19,6 +19,9 @@ Steps used to create the current version:
6 will need to modify the README to include the correct revision, and modif y
7 the buildfiles to reflect the actual files in the source tree, what they
8 #include, what warnings they trigger, etc.
9 + 01: Miscellaneous build fixes to make the upstream sources compile. At this
10 + point you should be able to build the protobuf_* and protoc targets (but
11 + not necessarily anything depending on them).
12 (3) Generate descriptor_pb2.py using something like the following steps. Make
13 sure you've regenerated your buildfiles and will build protoc from the
14 newly-modified sources above.
15 diff --git a/third_party/protobuf/src/google/protobuf/arena.h b/third_party/prot obuf/src/google/protobuf/arena.h
16 index 51149ba..ed9afc9 100644
17 --- a/third_party/protobuf/src/google/protobuf/arena.h
18 +++ b/third_party/protobuf/src/google/protobuf/arena.h
19 @@ -34,7 +34,16 @@
20 #if __cplusplus >= 201103L
21 #include <google/protobuf/stubs/type_traits.h>
22 #endif
23 +#if defined(_MSC_VER) && !_HAS_EXCEPTIONS
24 +// Work around bugs in MSVC <typeinfo> header when _HAS_EXCEPTIONS=0.
25 +#include <exception>
26 #include <typeinfo>
27 +namespace std {
28 +using type_info = ::type_info;
29 +}
30 +#else
31 +#include <typeinfo>
32 +#endif
33
34 #include <google/protobuf/stubs/atomic_sequence_num.h>
35 #include <google/protobuf/stubs/atomicops.h>
36 diff --git a/third_party/protobuf/src/google/protobuf/stubs/time.cc b/third_part y/protobuf/src/google/protobuf/stubs/time.cc
37 index 3319a24..49c0412 100644
38 --- a/third_party/protobuf/src/google/protobuf/stubs/time.cc
39 +++ b/third_party/protobuf/src/google/protobuf/stubs/time.cc
40 @@ -21,7 +21,6 @@ static const int64 kSecondsFromEraToEpoch = 62135596800LL;
41 static const int64 kMinTime = -62135596800LL; // 0001-01-01T00:00:00
42 static const int64 kMaxTime = 253402300799LL; // 9999-12-31T23:59:59
43
44 -static const int kNanosPerSecond = 1000000000;
45 static const int kNanosPerMillisecond = 1000000;
46 static const int kNanosPerMicrosecond = 1000;
47
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698