]> granicus.if.org Git - neomutt/commitdiff
Fixes for endianness detection (#893)
authorPietro Cerutti <gahr@gahr.ch>
Mon, 23 Oct 2017 11:50:37 +0000 (12:50 +0100)
committerGitHub <noreply@github.com>
Mon, 23 Oct 2017 11:50:37 +0000 (12:50 +0100)
* 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

index 74e8ffc3d41957486435952649286ad4763f6a39..3f6b23b3b32957879e36b185b137f8261cf8da97 100644 (file)
--- 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