Comment #9 on issue 119 by TYPE_BOOL collides with MacOS macro

I tried several tricks to solve this in the google source, but in the end, I settled on a #undef in any generated * which triggers a compilation error. E.g:

#undef TYPE_BOOL //avoid collision from Mac OS X's ConditionalMacros.h
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/descriptor.h>

Because this collision is not a function call, the trick used in message.h won't work. Also, because of translation unit/scope issues, #undef'ing and redefining without breaking one or both of the environments is not trivial.

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to