On Wed, Sep 21 2022, George Koehler <kern...@gmail.com> wrote: > On Thu, 22 Sep 2022 12:28:56 +1000 > Jonathan Gray <j...@jsg.id.au> wrote: > >> On Wed, Sep 21, 2022 at 10:13:44PM -0400, George Koehler wrote: >> This uses the compiler builtin __BYTE_ORDER__ instead of endian.h >> BYTE_ORDER. >> >> Both could be avoided by using htole32() instead. Then the two >> ifdefs could be removed as well. > > My 1st patch used swap32; this 2nd patch uses le32toh and works > equally well. ok for either swap32 or le32toh?
ok jca@ for le32toh (I had the same diff in some tree). Better use le32toh as this is what should end up in the next POSIX version[0]. [0] https://www.austingroupbugs.net/view.php?id=162 -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE