[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: WORDS_BIGENDIAN not defined on sparc Solaris 10!
From: |
Paul Eggert |
Subject: |
Re: WORDS_BIGENDIAN not defined on sparc Solaris 10! |
Date: |
Tue, 27 Nov 2007 09:10:37 -0800 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) |
Jim Meyering <address@hidden> writes:
> Don't hide the definition of WORDS_BIGENDIAN!
> * lib/autoconf/c.m4 (AC_C_BIGENDIAN): Remove AH_VERBATIM whose
> "#if defined __BIG_ENDIAN__" would effectively remove the definition
> of WORDS_BIGENDIAN that is required on e.g., sparc-based systems.
Thanks for catching that. What was supposed to happen is that
'configure' would generate config.h code that looks like this:
/* Define WORDS_BIGENDIAN to 1 if your processor stores words
with the most significant byte first (like Motorola and
SPARC, unlike Intel and VAX). */
#if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
#elif ! defined __LITTLE_ENDIAN__
# define WORDS_BIGENDIAN 1
#endif
which will define WORDS_BIGENDIAN to 1 on Sparc.
The problem is that Autoconf recently changed to a different way of
substituting for #defines, and the old template in AC_C_BIGENDIAN wasn't
compatible with the new way of doing this.
I installed this fix:
2007-11-27 Paul Eggert <address@hidden>
Fix AC_C_BIGENDIAN bug caused by new awk method of substitution.
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Don't comment out the
#undef as this runs afoul of our new way of creating config.h.
Problem reported by Jim Meyering in
<http://lists.gnu.org/archive/html/autoconf-patches/2007-11/msg00164.html>.
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -1401,7 +1401,7 @@ AC_DEFUN([AC_C_BIGENDIAN],
#if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
#elif ! defined __LITTLE_ENDIAN__
-/* #undef WORDS_BIGENDIAN */
+# undef WORDS_BIGENDIAN
#endif])dnl
AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian],
[ac_cv_c_bigendian=unknown