-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix C++ Boost incompatibility on Windows/MSVC #1483
Fix C++ Boost incompatibility on Windows/MSVC #1483
Conversation
Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test. |
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
I signed it! |
CLAs look good, thanks! |
@@ -279,7 +279,6 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) { | |||
// The following guarantees declaration of the byte swap functions, and | |||
// defines __BYTE_ORDER for MSVC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks.
Ready to go. |
Thanks! Could you merge the commits into one commit? I'll merge this pull request after that. |
98af4f0
to
f4bc9e0
Compare
Done! |
@xfxyjwf Ping. |
…atibility Fix C++ Boost incompatibility on Windows/MSVC
Removes the #definition of __BYTE_ORDER on Windows which is unused by the rest of the Protobuf library (at least according to grep)
__LITTLE_ENDIAN and __BIG_ENDIAN are both undefined, meaning that
__BYTE_ORDER == __LITTLE_ENDIAN
and
__BYTE_ORDER == __BIG_ENDIAN
both wind up evaluating to true.This breaks boost/predef/other/endian.h, which checks for the existence of sys/param.h by looking for __BYTE_ORDER, and assumes that if __BYTE_ORDER is defined, then both __LITTLE_ENDIAN and __BIG_ENDIAN will be.
If these variables are required, a more complete windows shim of sys/param.h should be created.