Skip to content
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

Merged
merged 1 commit into from
May 11, 2016

Conversation

yeswalrus
Copy link

@yeswalrus yeswalrus commented May 4, 2016

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.

@grpc-kokoro
Copy link

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

@googlebot
Copy link

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!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@yeswalrus
Copy link
Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@googlebot googlebot added cla: yes and removed cla: no labels May 4, 2016
@yeswalrus yeswalrus changed the title Remove confounding and unused #define Fix C++ Boost incompatibility on Windows/MSVC May 4, 2016
@@ -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
Copy link
Contributor

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?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks.

@xfxyjwf xfxyjwf self-assigned this May 4, 2016
@yeswalrus
Copy link
Author

Ready to go.

@xfxyjwf
Copy link
Contributor

xfxyjwf commented May 5, 2016

Thanks! Could you merge the commits into one commit? I'll merge this pull request after that.

@yeswalrus yeswalrus force-pushed the fix-boost-incompatibility branch from 98af4f0 to f4bc9e0 Compare May 7, 2016 00:13
@yeswalrus
Copy link
Author

Done!

@yeswalrus
Copy link
Author

@xfxyjwf Ping.

@xfxyjwf xfxyjwf merged commit 920ee73 into protocolbuffers:master May 11, 2016
@yeswalrus yeswalrus deleted the fix-boost-incompatibility branch June 6, 2016 20:27
bithium pushed a commit to bithium/protobuf that referenced this pull request Sep 4, 2023
…atibility

Fix C++ Boost incompatibility on Windows/MSVC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants