Closed barracuda156 closed 1 year ago
@georgmartius If there is some specific reason not to use OS implementation for double, we can drop that line and move one #endif
.
Hi, Well, I cannot remember this code very well. I have no idea why there is a custom implementation for double. I would not change it, unless we are very sure, though.
Hi,
Well, I cannot remember this code very well. I have no idea why there is a custom implementation for double. I would not change it, unless we are very sure, though.
@georgmartius Thank you for responding. Proposed changes affect only Darwin PPC (which is broken at the moment), no other platforms. My thought was that some non-Apple systems may not have bswap64 in that header, hence explicit implementation for it (and Apple case was not considered). But this is a guess.
Is there a way to ensure it does the same? If yes, OS implementation should be preferred. Otherwise I can keep the custom one for all Big endian, since it does not rely on non-existent headers, and presumably gonna work on Apple as well.
I suggest I merge your version now, as I have no time to test alternatives etc. Even though it is not that pretty, that we have different implementations for differerent platforms.
Thank you!
There is no
byteswap.h
on macOS, respective functions are defined inlibkern
headers. Implement a fix similar to what was done forxrootd
earlier: https://github.com/macports/macports-ports/commit/ec6af9d37037d2821d255b74f131648daff866e5 (merged to upstream since then too).