-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add in missing endianess functions for Apple targets #1130
Conversation
I am building macOS, iPhoneOS and iPhoneSimulator in a single shot. It is the same issue as appears in 1025 |
A better approach might be to check for the individual functions, but it is sort of an all-or-nothing affair since none of these functions appear in AppleVerse |
This endian.h compat thing is just such an unbelievable mess :) We copied this from openiked, which has always had this Is it aversion of this Endian.h which is picked up due to case-insensitivity of the file system on macOS (I assume that's still the case)? All that said, I am inclined to merge this. I will do so in a couple of days. |
All of the current SDKs have these endian files:
In cmake you could go with:
|
5363b36
to
76d08d3
Compare
I had failed to update the comment at the bottom of the block to match, but I've done that now. |
Thanks. I was hoping we could avoid doing in this super fine grained manner, but yes, it's probably cleaner than what we have now... It's just surprising that I can't find a ready-made solution that covers all our needs. It feels like it should exist... |
76d08d3
to
77a5e4a
Compare
What if I just switched the check to this:
|
77a5e4a
to
e03fc1b
Compare
I'm pretty sure that the previous diff was better. This logic introduces an unexpected difference between the CMake and automake builds which will likely bite us down the road. I'd like to merge the previous version and next time an issue shows up we'll have to sit down and do the grunt work of solving this "the right way." |
Doesn't the other formulation leave windows builds broken? In endian.h, right after the equivalent Apple bit there is similar code defining non-existent functions with the expectation that endian.h does not exist. I can't answer whether or not windows machines have endian.h or not, nor whether they are missing these #defines.
|
e03fc1b
to
5626ce4
Compare
In any case, the original version works for Apple and that is what matters to me :) |
Did you need anything else for this MR? |
No, it's all good. Merged now, thanks. |
Apple SDKs indeed have the endian.h headers, but they do not contain these functions and therefore will error out when doing a cmake build. Remove the conditional HAVE_ENDIAN check or remove the conditional check for Apple compatibility? I chose to remove the conditional check for Apple compatibility.