diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2017-02-13 17:03:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-13 17:03:55 -0800 |
commit | d2dfe46b2789dfe155559508c3f567a746a50616 (patch) | |
tree | bd65c80d738c1d91965de4dcf8352f6056a43984 | |
parent | 3f6f73b796988f47bfc157d3a9faee81fad7fa89 (diff) | |
parent | e41b667da50d582ac8e38cfea4af4e78261f2ad3 (diff) | |
download | protobuf-d2dfe46b2789dfe155559508c3f567a746a50616.tar.gz protobuf-d2dfe46b2789dfe155559508c3f567a746a50616.tar.bz2 protobuf-d2dfe46b2789dfe155559508c3f567a746a50616.zip |
Merge pull request #2609 from yixiang/patch-1
Undef TYPE_BOOL to avoid conflict with iOS.
-rw-r--r-- | src/google/protobuf/wire_format_lite.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/google/protobuf/wire_format_lite.h b/src/google/protobuf/wire_format_lite.h index bc076f6b..60355144 100644 --- a/src/google/protobuf/wire_format_lite.h +++ b/src/google/protobuf/wire_format_lite.h @@ -46,6 +46,16 @@ #include <google/protobuf/message_lite.h> #include <google/protobuf/io/coded_stream.h> // for CodedOutputStream::Varint32Size +// Avoid conflict with iOS where <ConditionalMacros.h> #defines TYPE_BOOL. +// +// If some one needs the macro TYPE_BOOL in a file that includes this header, it's +// possible to bring it back using push/pop_macro as follows. +// +// #pragma push_macro("TYPE_BOOL") +// #include this header and/or all headers that need the macro to be undefined. +// #pragma pop_macro("TYPE_BOOL") +#undef TYPE_BOOL + namespace google { namespace protobuf { |