From: Marco Maggi Date: Sat, 20 Oct 2018 11:30:25 +0000 (+0200) Subject: restore the definition of WORDS_BIGENDIAN when the platform is big endian X-Git-Tag: R_2_2_7~21^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5a8932204bb8509bebd4b9da3f9d1823cdadc83;p=libexpat restore the definition of WORDS_BIGENDIAN when the platform is big endian --- diff --git a/expat/configure.ac b/expat/configure.ac index bf74368b..7f76db57 100644 --- a/expat/configure.ac +++ b/expat/configure.ac @@ -103,12 +103,16 @@ AC_HEADER_STDC dnl Checks for typedefs, structures, and compiler characteristics. dnl We define BYTEORDER to 1234 when the platform is little endian; it -dnl defines it to 4321 when the platform is big endian. +dnl defines it to 4321 when the platform is big endian. We also define +dnl WORDS_BIGENDIAN to 1 when the platform is big endian. dnl -dnl A long time ago (early 2000 years) AC_C_BIGENDIAN was considered wrong -dnl when cross compiling, now (2018, GNU Autoconf 2.69) we assume it is fine. -AC_C_BIGENDIAN([BYTEORDER=4321],[BYTEORDER=1234]) -AC_DEFINE_UNQUOTED(BYTEORDER, $BYTEORDER, [1234 = LILENDIAN, 4321 = BIGENDIAN]) +dnl A long time ago (early 2000 years) AC_C_BIGENDIAN was considered +dnl wrong when cross compiling, now (2018, GNU Autoconf 2.69) we assume +dnl it is fine. +AC_C_BIGENDIAN([AC_DEFINE([WORDS_BIGENDIAN], 1) + AS_VAR_SET([BYTEORDER], 4321)], + [AS_VAR_SET([BYTEORDER], 1234)]) +AC_DEFINE_UNQUOTED([BYTEORDER], $BYTEORDER, [1234 = LILENDIAN, 4321 = BIGENDIAN]) AC_C_CONST AC_TYPE_SIZE_T