On Mon, Jun 10, 2002 at 04:53:36PM +0100, [EMAIL PROTECTED] wrote:
> I've picked up the snapshot.  There is a problem with the new code.
> 
> GCCVER=`(gcc --version) 2>/dev/null | head -1`
> if [ "$GCCVER" != "" ]; then
>   CC=gcc
>   # then strip off whatever prefix Cygnus as well as GCC 3.1 prepends
>   # the number with...  Hopefully, this will work for any future prefixes
>   # as well.
>   GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z ()]*\-//'`
>   # peak single digit before and after first dot, e.g. 2.95.1 gives 29
>   GCCVER=`echo $GCCVER | sed 's/\([0-9]\)\.\([0-9]\).*/\1\2/'`
> else
>   CC=cc
> fi
> GCCVER=${GCCVER:-0}
> 
> The problem is with
> 
>   GCCVER=`echo $GCCVER | sed 's/^[a-zA-Z ()]*\-//'`
> 
> The \-  doesn't work with gcc 3.1 which outputs
> 
> gcc (GCC) 3.1.

Hmm. From "cvs log config":

revision 1.101
date: 2002/06/05 05:00:51;  author: levitte;  state: Exp;  lines: +5 -3
Update the recognision of GCC version numbers to handle the prefix text
that GCC 3.1 adds to the --version output

Maybe the change for 1.101 (or similar fo the BRANCHes) was not sufficient.
I have CC'ed Richard Levitte.

> I can fix the regex but I like know the reasoning behind it.  I tried
> 
> ^[a-zA-Z ()]*\-?
> 
> but this doesn't work with sed because it an extended regex and not
> supported by
> HP or GNU sed.
> 
> As for detecting 64bit GCC, that looks fairly easy.  GCC passes a define
> -D__LP64__
> to cpp.  Otherwise it would something like
> 
> int main()
> {
>   if ((sizeof(long) == 8) && (sizeof(void*) == 8)) return 1; /* LP64 */
>   or ((sizeof(long == 8) || (sizeof(void*) == 8)) return -1; /* error, this
> should never happen on hpux */
>   or return 0;
> }
> 
> would work.

__LP__64 should work for the scheme used for other platforms, so we
probably don't need to test-compile a file.

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
http://www.aet.TU-Cottbus.DE/personen/jaenicke/
BTU Cottbus, Allgemeine Elektrotechnik
Universitaetsplatz 3-4, D-03044 Cottbus
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to