[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: |
Ralf Wildenhues |
Subject: |
Re: WORDS_BIGENDIAN not defined on sparc Solaris 10! |
Date: |
Tue, 27 Nov 2007 18:42:04 +0100 |
User-agent: |
Mutt/1.5.17 (2007-11-13) |
Hello Paul,
* Paul Eggert wrote on Tue, Nov 27, 2007 at 06:10:37PM CET:
>
> Thanks for catching that. What was supposed to happen is that
> 'configure' would generate config.h code that looks like this:
[...]
> 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.
Wait there for a minute. The new method is supposed to be bug-for-bug
compatible with the old one. If it's not, then it needs fixing.
But I think it is: Autoconf 2.59 would not substitute an input file
containing:
/* #undef FOO */
either:
cat >configure.ac <<'END'
AC_INIT
AC_CONFIG_HEADERS(config.h)
AH_TEMPLATE([
/* #undef FOO */
])
AC_DEFINE([FOO], [1], [Foo])
AC_OUTPUT
END
autoconf
autoheader
./configure
grep FOO config.h
leads to:
| /* #undef FOO */
| #define FOO 1
with both 2.59 and current code.
It's really a bug in the AC_C_BIGENDIAN code, which was introduced only
post-2.59, in
<http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=a49bbf7a83ae815b2694688ec74d6375badbaefb;hp=74416a3598b9ec94edc080787397c1c54cd117c7>
> I installed this fix:
Thanks for doing that!
Cheers,
Ralf
> 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
>
>
>