On 2024-05-04 13:54, Collin Funk wrote:
IIRC in <stdbit.h> there is:
#define __STDC_ENDIAN_LITTLE__ /* Unique constant */
#define __STDC_ENDIAN_BIG__ /* Unique constant */
#define __STDC_ENDIAN_NATIVE__ /* __STDC_ENDIAN_LITTLE__ or
__STDC_ENDIAN_BIG__ */
probably with values taken from Glibc's <endian.h> or BSD's
<sys/endian.h>.
But, I think the next POSIX revision has <endian.h> like Glibc which I
prefer.
If the past is any guide, an advantage of the C23 version is that in the
long run it is likely to be more portable. POSIX is an extension of C.