Bug 1385461 - Document the reason for wire_format.cc in SOURCES. draft
authorFrancois Marier <francois@mozilla.com>
Thu, 12 Oct 2017 17:27:56 -0700
changeset 680402 0ae38eb1cc1d249c6a9fcd6425209a18cf5db625
parent 680401 c7a48608b3eaa09997e8d6908bea20cbdbb0c7a2
child 735846 9732f26e4b2557434de98de53065bde67a30ddc0
push id84493
push userfmarier@mozilla.com
push dateFri, 13 Oct 2017 23:58:48 +0000
bugs1385461, 1024774
milestone58.0a1
Bug 1385461 - Document the reason for wire_format.cc in SOURCES. wire_format.cc needs to be out of UNIFIED_SOURCES because it won't get the GetMessage undef from common.h: https://github.com/google/protobuf/blob/b04e5cba356212e4e8c66c61bbe0c3a20537c5b9/src/google/protobuf/stubs/common.h#L76-L91 which works around windows.h containing a define for GetMessage() that turns it into GetMessageA(). This removes the need for the customization added in bug 1024774: https://hg.mozilla.org/mozilla-central/diff/8f5b5bbc27af/toolkit/components/protobuf/m-c-changes.patch#l1.25 MozReview-Commit-ID: CrpgEQCBWhf
toolkit/components/protobuf/moz.build
--- a/toolkit/components/protobuf/moz.build
+++ b/toolkit/components/protobuf/moz.build
@@ -230,17 +230,17 @@ SOURCES += [
     'src/google/protobuf/util/internal/json_escaping.cc', # namespace problem in json_escaping.h
     'src/google/protobuf/util/internal/json_objectwriter.cc', # namespace problem in json_escaping.h
     'src/google/protobuf/util/internal/json_stream_parser.cc',
     'src/google/protobuf/util/internal/proto_writer.cc', # GetCurrentTime conflict in winbase.h
     'src/google/protobuf/util/internal/protostream_objectsource.cc', # GetCurrentTime conflict in winbase.h
     'src/google/protobuf/util/internal/protostream_objectwriter.cc', # GetCurrentTime conflict in winbase.h
     'src/google/protobuf/util/message_differencer.cc',
     'src/google/protobuf/util/time_util.cc', # GetCurrentTime conflict in winbase.h
-    'src/google/protobuf/wire_format.cc',
+    'src/google/protobuf/wire_format.cc', # GetMessage conflict in windows.h
 ]
 
 # We allow warnings for third-party code that can be updated from upstream.
 ALLOW_COMPILER_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
 
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True