From 48fa58768fbc27a3939e34b35f76f20beeb666bc Mon Sep 17 00:00:00 2001 From: helmesjo Date: Wed, 30 Oct 2024 11:56:22 +0100 Subject: [PATCH] BYTE_ORDER: If '__DARWIN_BYTE_ORDER' isn't defined (eg. on apple-silicon) then little-endian is assumed. --- libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h b/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h index 35ab553d..b196f80c 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h @@ -37,6 +37,13 @@ # if defined(__DARWIN_BYTE_ORDER) # define BYTE_ORDER __DARWIN_BYTE_ORDER # define BIG_ENDIAN __DARWIN_BIG_ENDIAN +# define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN + /* if '__DARWIN_BYTE_ORDER' isn't defined then + then little-endian is assumed (eg. apple-silicon) + */ +# else +# define BYTE_ORDER __DARWIN_LITTLE_ENDIAN +# define BIG_ENDIAN __DARWIN_BIG_ENDIAN # define LITTLE_ENDIAN __DARWIN_LITTLE_ENDIAN # endif # elif defined(_WIN32)