Attention is currently required from: Paul Menzel, Julius Werner. Alex James has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/60219 )
Change subject: commonlib: Add endian definitions for macOS ......................................................................
Patch Set 3:
(2 comments)
Patchset:
PS2:
If that works, yeah, I think that would be nice just to keep the visual space taken up by this a bit […]
Thanks! I've updated the change to use macros.
PS2:
I'm surprised that MacOS doesn't have these... […]
As far as I know, machine/endian.h simply includes the architecture-specific header [1]. On x86/x86-64, this file defines LITTLE_ENDIAN/BIG_ENDIAN/BYTE_ORDER and includes another header (sys/_endian.h) [2]. sys/_endian.h defines ntohl and friends, but not htole32/etc [3]. I couldn't find existing definitions of these functions anywhere.
[1]: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/machine/endian.... [2]: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/i386/endian.h [3]: https://github.com/apple-oss-distributions/xnu/blob/main/bsd/sys/_endian.h