From: Mostyn Bramley-Moore Date: Mon, 30 Dec 2024 16:31:14 +0000 (+0100) Subject: Detect endianness at build time for common MSVC targets also (#2466) X-Git-Tag: v3.8.0~83 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=1427f3431d3479dd0bc72cdbbd082fc9391c3cf3;p=thirdparty%2Flibarchive.git Detect endianness at build time for common MSVC targets also (#2466) This should now cover the most common build targets. --- diff --git a/libarchive/archive_string.c b/libarchive/archive_string.c index ef0bb7c88..8ab3b994b 100644 --- a/libarchive/archive_string.c +++ b/libarchive/archive_string.c @@ -206,6 +206,8 @@ static int archive_string_append_unicode(struct archive_string *, #define IS_BIG_ENDIAN 0 #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) #define IS_BIG_ENDIAN 1 +#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_X64) || defined(_M_ARM64)) + #define IS_BIG_ENDIAN 0 #else // Detect endianness at runtime. static int