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

Provide betole|letobe macros on OS X. #137

Merged
merged 1 commit into from Jan 2, 2018

Conversation

2 participants
@haesbaert
Contributor

haesbaert commented Jan 1, 2018

OS X endian.h doesn't define betole|letobe functions. It's also not optional
depending on a #define, it's really not there. This seems to be the common
solution people adopt.

This change adds all macros, even ones that are not used by nocrypto to match
endian.h on other systems, otherwise this problem will pop up again once another
betole/letobe function is used.

It was broken on the cpu_to_* conversion on commit:
commit 555d2fe
Author: pqwy david@numm.org
Date: Sat Dec 9 21:41:17 2017 -0500

uncrap counters
Provide betole|letobe macros on OS X.
OS X endian.h doesn't define betole|letobe functions. It's also not optional
depending on a #define, it's really not there. This seems to be the common
solution people adopt.

This change adds all macros, even ones that are not used by nocrypto to match
endian.h on other systems, otherwise this problem will pop up again once another
betole/letobe function is used.

It was broken on the cpu_to_* conversion on commit:
commit 555d2fe
Author: pqwy <david@numm.org>
Date:   Sat Dec 9 21:41:17 2017 -0500

    uncrap counters
@pqwy

This comment has been minimized.

Show comment
Hide comment
@pqwy

pqwy Jan 2, 2018

Contributor

Wow. I had no idea there wasn't a standard set of endian-conversion symbols on all UNIXy systems.

As people really seem to work around like this, and I have no direct means of testing it, I'll take it on blind faith.

Thanks!

Contributor

pqwy commented Jan 2, 2018

Wow. I had no idea there wasn't a standard set of endian-conversion symbols on all UNIXy systems.

As people really seem to work around like this, and I have no direct means of testing it, I'll take it on blind faith.

Thanks!

@pqwy pqwy merged commit d4efa12 into mirleft:master Jan 2, 2018

1 check failed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
@pqwy

This comment has been minimized.

Show comment
Hide comment
@pqwy

pqwy Jan 2, 2018

Contributor

Oh.

And happy New Year!

Contributor

pqwy commented Jan 2, 2018

Oh.

And happy New Year!

@haesbaert

This comment has been minimized.

Show comment
Hide comment
@haesbaert

haesbaert Jan 7, 2018

Contributor

Yes, sadly endian.h is not standarized.

Happy New Year as well !

Contributor

haesbaert commented Jan 7, 2018

Yes, sadly endian.h is not standarized.

Happy New Year as well !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment