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

Use CMake for big-endian test #8

Merged
merged 1 commit into from
Dec 20, 2015
Merged

Conversation

ekroon
Copy link
Contributor

@ekroon ekroon commented Sep 7, 2015

The test that was in the source code itself was not working on OSX and incorrectly used big-endian. As CMake is already used, I changed the code to use that.

@ekroon ekroon mentioned this pull request Sep 10, 2015
@dgrigsby
Copy link

Here's the definition code:
#define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100)

And here's the code in endoders.c (similar in loaders.c):
#ifdef IS_BIG_ENDIAN
...
#else
...
#endif

Is the issue simply that we needed to use #if not #ifdef? (!)

@dgrigsby dgrigsby mentioned this pull request Dec 15, 2015
@PJK
Copy link
Owner

PJK commented Dec 20, 2015

Thank you, @ekroon, I find this approach much better.

I will revise the usage in #10 , thanks for pointing that out, @dgrigsby

PJK added a commit that referenced this pull request Dec 20, 2015
@PJK PJK merged commit 24f3d4c into PJK:master Dec 20, 2015
PJK added a commit that referenced this pull request Jan 6, 2017
PJK added a commit that referenced this pull request Jan 10, 2017
PJK added a commit that referenced this pull request Jan 11, 2017
PJK added a commit that referenced this pull request Sep 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants