Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 99630 invoked from network); 7 Aug 2008 22:47:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2008 22:47:33 -0000 Received: (qmail 79480 invoked by uid 500); 7 Aug 2008 22:47:31 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 79436 invoked by uid 500); 7 Aug 2008 22:47:31 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 79425 invoked by uid 99); 7 Aug 2008 22:47:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2008 15:47:31 -0700 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.135.220.15] (HELO mx2.suse.de) (195.135.220.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Aug 2008 22:46:35 +0000 Received: from Relay2.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id D63E945EE1 for ; Fri, 8 Aug 2008 00:46:01 +0200 (CEST) Date: Fri, 8 Aug 2008 00:46:01 +0200 From: Peter Poeml To: dev@apr.apache.org Subject: Re: Time for 1.3.3 Message-ID: <20080807224601.GC686@suse.de> References: <489B54EB.7010300@apache.org> <200808072323.09488.sf@sfritsch.de> <489B6CEA.7090205@rowe-clan.net> <200808080024.22344.sf@sfritsch.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SO98HVl1bnMOfKZd" Content-Disposition: inline In-Reply-To: <200808080024.22344.sf@sfritsch.de> X-Useless-Header: If you read this, say 'honk'! User-Agent: Mutt/1.5.13 (2006-08-11) Sender: Peter Poeml X-Virus-Checked: Checked by ClamAV on apache.org --SO98HVl1bnMOfKZd Content-Type: multipart/mixed; boundary="yLVHuoLXiP9kZBkt" Content-Disposition: inline --yLVHuoLXiP9kZBkt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 08, 2008 at 12:24:22 +0200, Stefan Fritsch wrote: > On Thursday 07 August 2008, William A. Rowe, Jr. wrote: > > Stefan, my goal is to have a working 2.62 ready package, so I'll > > take a closer look, but if other folks would take a peek at this > > flaw, we'd really appreciate it. It just can't be that hard to fix > > (if I had cycles I would have already investigated). Some flags > > are missing somehow for the testrand target. >=20 > The problem is that AC_C_BIGENDIAN is broken in autoconf 2.62. This=20 > will result in APR_IS_BIGENDIAN in apr.h getting the wrong value,=20 > which might break other software and not just the test. In the case=20 > of testrand, the problematic code is in random/unix/sha2.c and not in=20 > testrand.c. >=20 > Is there really something in 2.62 you need, or could you simply use=20 > 2.61 to generate the configure in the tarball? Alternatively, you=20 > could grab the patch reverting AC_C_BIGENDIAN to the 2.61 behaviour=20 > from some linux distro and use the patched autoconf. >=20 > Stefan Here is the patch that we added at openSUSE to revert the breakage. Peter --=20 "WARNING: This bug is visible to non-employees. Please be respectful!" =20 SUSE LINUX Products GmbH Research & Development --yLVHuoLXiP9kZBkt Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="ac-c-bigendian.diff" Content-Transfer-Encoding: quoted-printable --- doc/autoconf.texi +++ doc/autoconf.texi @@ -6739,7 +6739,7 @@ New programs need not use this macro. =20 @anchor{AC_C_BIGENDIAN} @defmac AC_C_BIGENDIAN (@ovar{action-if-true}, @ovar{action-if-false}, @ - @ovar{action-if-unknown}, @ovar{action-if-universal}) + @ovar{action-if-unknown}) @acindex{C_BIGENDIAN} @cvindex WORDS_BIGENDIAN @cindex Endianness @@ -6753,26 +6753,11 @@ system header files. When cross-compili grep'ed for some magic values. @var{action-if-unknown} is executed if the latter case fails to determine the byte sex of the host system. =20 -In some cases a single run of a compiler can generate code for multiple -architectures. This can happen, for example, when generating Mac OS X -universal binary files, which work on both PowerPC and Intel -architectures. In this case, the different variants might be for -different architectures whose endiannesses differ. If -@command{configure} detects this, it executes @var{action-if-universal} -instead of @var{action-if-unknown}. - The default for @var{action-if-true} is to define @samp{WORDS_BIGENDIAN}. The default for @var{action-if-false} is to do -nothing. The default for @var{action-if-unknown} is to -abort configure and tell the installer how to bypass this test. -And finally, the default for @var{action-if-universal} is to define -@samp{WORDS_BIGENDIAN} or not, depending on the architecture that the -code is being generated for. - -If you use this macro without specifying @var{action-if-universal}, you -should also use @code{AC_CONFIG_HEADERS}; otherwise -@samp{WORDS_BIGENDIAN} may be set incorrectly for Mac OS X universal -binary files. +nothing. And finally, the default for @var{action-if-unknown} is to +abort configure and tell the installer which variable he should preset +to bypass this test. @end defmac =20 @anchor{AC_C_CONST} --- lib/autoconf/c.m4 +++ lib/autoconf/c.m4 @@ -1393,140 +1393,74 @@ fi ])# AC_C_CHAR_UNSIGNED =20 =20 -# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN], -# [ACTION-IF-UNIVERSAL]) +# AC_C_BIGENDIAN ([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN]) # ------------------------------------------------------------------------- AC_DEFUN([AC_C_BIGENDIAN], -[AH_VERBATIM([WORDS_BIGENDIAN], -[/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the mo= st - significant byte first (like Motorola and SPARC, unlike Intel and VAX).= */ -#if defined __BIG_ENDIAN__ -# define WORDS_BIGENDIAN 1 -#elif ! defined __LITTLE_ENDIAN__ -# undef WORDS_BIGENDIAN -#endif])dnl - AC_CACHE_CHECK([whether byte ordering is bigendian], [ac_cv_c_bigendian], - [ac_cv_c_bigendian=3Dunknown - m4_ifval(m4_ifdef([AH_HEADER], 1)[$4], - [# See if __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined. - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#if ! (defined __BIG_ENDIAN__ || defined __LITTLE_ENDIAN__) - neither is defined; - #endif - typedef int dummy; - ]])], - [ac_cv_c_bigendian=3Duniversal])], - [AC_DIAGNOSE([obsolete], [AC_C_BIGENDIAN suggests AC_CONFIG_HEADERS]= )]) - if test $ac_cv_c_bigendian =3D unknown; then - # See if sys/param.h defines the BYTE_ORDER macro. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - ]], - [[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ - && LITTLE_ENDIAN) - bogus endian macros - #endif - ]])], - [# It does; now see whether it defined to BIG_ENDIAN or not. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - ]], - [[#if BYTE_ORDER !=3D BIG_ENDIAN - not big endian - #endif - ]])], - [ac_cv_c_bigendian=3Dyes], - [ac_cv_c_bigendian=3Dno])]) - fi - if test $ac_cv_c_bigendian =3D unknown; then - # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Sol= aris). - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) - bogus endian macros - #endif - ]])], - [# It does; now see whether it defined to _BIG_ENDIAN or not. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[#ifndef _BIG_ENDIAN - not big endian - #endif - ]])], - [ac_cv_c_bigendian=3Dyes], - [ac_cv_c_bigendian=3Dno])]) - fi - if test $ac_cv_c_bigendian =3D unknown; then - # Compile a test program. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], - [[ - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long int l; - char c[sizeof (long int)]; - } u; - u.l =3D 1; - return u.c[sizeof (long int) - 1] =3D=3D 1; - ]])], - [ac_cv_c_bigendian=3Dno], - [ac_cv_c_bigendian=3Dyes], - [# Try to guess by grepping values from an object file. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[short int ascii_mm[] =3D - { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; - short int ascii_ii[] =3D - { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; - int use_ascii (int i) { - return ascii_mm[i] + ascii_ii[i]; - } - short int ebcdic_ii[] =3D - { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; - short int ebcdic_mm[] =3D - { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; - int use_ebcdic (int i) { - return ebcdic_mm[i] + ebcdic_ii[i]; - } - extern int foo; - ]], - [[return use_ascii (foo) =3D=3D use_ebcdic (foo);]])], - [if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then - ac_cv_c_bigendian=3Dyes - fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" =3D unknown; then - ac_cv_c_bigendian=3Dno - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=3Dunknown - fi - fi])]) - fi]) - case $ac_cv_c_bigendian in #( - yes) - m4_default([$1], - [AC_DEFINE([WORDS_BIGENDIAN], 1)]);; #( - no) - $2 ;; #( - universal) - $4 ;; #( - *) - m4_default([$3], - [AC_MSG_ERROR([unknown endianness - presetting ac_cv_c_bigendian=3Dno (or yes) will help])]) ;; - esac +[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian, +[# See if sys/param.h defines the BYTE_ORDER macro. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include +#include +], +[#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN= \ + && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) + bogus endian macros +#endif +])], +[# It does; now see whether it defined to BIG_ENDIAN or not. +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include +#include +], [#if BYTE_ORDER !=3D BIG_ENDIAN + not big endian +#endif +])], [ac_cv_c_bigendian=3Dyes], [ac_cv_c_bigendian=3Dno])], +[# It does not; compile a test program. +AC_RUN_IFELSE( +[AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT], [[ + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l =3D 1; + return u.c[sizeof (long int) - 1] =3D=3D 1; +]])], + [ac_cv_c_bigendian=3Dno], + [ac_cv_c_bigendian=3Dyes], +[# try to guess the endianness by grepping values into an object file + ac_cv_c_bigendian=3Dunknown + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[short int ascii_mm[] =3D { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x795= 3, 0 }; +short int ascii_ii[] =3D { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61,= 0 }; +void _ascii () { char *s =3D (char *) ascii_mm; s =3D (char *) ascii_ii; } +short int ebcdic_ii[] =3D { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581= , 0 }; +short int ebcdic_mm[] =3D { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2= , 0 }; +void _ebcdic () { char *s =3D (char *) ebcdic_mm; s =3D (char *) ebcdic_ii= ; }]], +[[ _ascii (); _ebcdic (); ]])], +[if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then + ac_cv_c_bigendian=3Dyes +fi +if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" =3D unknown; then + ac_cv_c_bigendian=3Dno + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=3Dunknown + fi +fi])])])]) +case $ac_cv_c_bigendian in + yes) + m4_default([$1], + [AC_DEFINE([WORDS_BIGENDIAN], 1, + [Define to 1 if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX).])]) ;; + no) + $2 ;; + *) + m4_default([$3], + [AC_MSG_ERROR([unknown endianness +presetting ac_cv_c_bigendian=3Dno (or yes) will help])]) ;; +esac ])# AC_C_BIGENDIAN =20 =20 --yLVHuoLXiP9kZBkt-- --SO98HVl1bnMOfKZd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFIm3sp92K4Je+2lOoRAtezAJ9Sel50UjszpY+flHbpuPLM4mXn2wCfUdS/ 2NdkSGjKUHIiLUHT7roU05Q= =xCNq -----END PGP SIGNATURE----- --SO98HVl1bnMOfKZd--