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
deps: ntlmclient: provide platform-independent htonll implementation #5614
Conversation
/cc @ethomson |
With the introduction of ntlmclient, we've started playing whac-a-mole with platforms to support the non-standard htonll function. Let's end this game once and for all by providing a generic implementation that's implemented via htonl(3P) and a endianness-check in CMake.
03fb6a7
to
aaa4fda
Compare
Could this be done without requiring the endianness to be detected in the cmake script, but rather detecting it at build time in compat.h using preprocessor defines that are provided by the compiler? On some platforms like macOS it is possible to build for multiple architectures simultaneously (e.g. |
For example,
I don't know what defines other systems use. |
Macro htonll() is not defined on these platforms. Closes https://trac.macports.org/ticket/61057 Thanks to @ryandesign for pushing this upstream. See libgit2/libgit2#5613 and libgit2/libgit2#5614.
This isn't something that we support out-of-the-box already. Our cmake recipes determine the bitness of the machine (see |
Although having said that, we do need to let people who build without CMake deal with this properly. We have a pattern for the libgit2 defines (like |
Building with
You probably don't want to add any code to do multi-architecture builds. It's fine to leave that up to the users who want to do it. For the sake of MacPorts, I'll switch our libgit2 build over to the build-multiple-times-and-lipo approach. |
Interesting. I'll have to do a little investigation here. I suspect that - assuming that you're doing the build on amd64 (which I certainly hope is true 😁) that the i386 version may have some issues. I'll have to 👀 |
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.
We'll need to add this to config.h.in
to support non-CMake users.
Fixed with #5658 which won't require any changes to |
With the introduction of ntlmclient, we've started playing whac-a-mole
with platforms to support the non-standard htonll function. Let's end
this game once and for all by providing a generic implementation that's
implemented via htonl(3P) and a endianness-check in CMake.