From 5a2ef14bfc98ee9fe8b4efd4f9a72879363e32dc Mon Sep 17 00:00:00 2001 From: Pietro Cerutti Date: Mon, 23 Oct 2017 12:50:37 +0100 Subject: [PATCH] Fixes for endianness detection (#893) * Move endian check after system extensions GNU/Linux does not seem to define BYTE_ORDER in vanilla c99 mode. Issue #883 * Make sure WORDS_BIGENDIAN is defined if big-endian Issue #883 * Fix typo: s/Endianess/Endianness/ Issue #883 --- auto.def | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/auto.def b/auto.def index 74e8ffc3d..3f6b23b3b 100644 --- a/auto.def +++ b/auto.def @@ -202,9 +202,6 @@ if {1} { } } - # Endianess - cc-check-endian - # GCC-specifc CFLAGS if {![catch {exec [get-define CC] --version} res]} { if {[regexp -nocase gcc $res]} { @@ -225,6 +222,12 @@ if {1} { } cc-with [list -cflags [get-define CFLAGS]] + # Endianness + cc-check-endian + if {[have-feature BIG_ENDIAN]} { + define WORDS_BIGENDIAN + } + # Large file support if {[cc-check-lfs]} { define OFF_T_FMT {"%" PRId64} @@ -823,6 +826,7 @@ set auto_rep { SUN_ATTACHMENT SYSCONFDIR USE_* + WORDS_BIGENDIAN } set bare_rep { ICONV_CONST -- 2.40.0