-
Notifications
You must be signed in to change notification settings - Fork 38.7k
[WIP] Fix: OSX QT compile fix: defer to bswap_XX when defined. #9361
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
Conversation
jonasschnelli
left a comment
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.
Makes sense.
Code Review utACK e62650b5d5fa643daf337031cb4cb914704dd346
|
Yes, seems sensible. It's unfortunate that protobuf exports such common names as macros in their public interface. |
|
Protobuf detects and uses the OS defined OSSwapIntXX macros which might be a nice thing. Other than that yes I'm surprised they are as clumsy as they are considering it's Google. |
That would be a nice thing if you addded the same detection to our autoconf. The byteswap functions are mainly used in places that don't include (and can't depend on) protobuf. Now this creates an inconsistency between compilation units that include protobuf and don't include protobuf, in unrelated code. |
|
That makes a lot of sense. I will dig. |
e62650b to
814b6df
Compare
814b6df to
6ad24ec
Compare
…ined. Defers to pre-defined version if found (e.g. protobuf). For protobuf case, the definitions are identical and thus include order should not affect results.
6ad24ec to
e83b11b
Compare
|
I somehow messed the rebase up. Reopening. Sorry about that. |
Defer to (protobuf) defined
bswap_XXmacros when defined. This resolves compile errors for the QT client on OSX.