Lutz,

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.

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.

Any suggestions?

Ross

---------------------------------------------------------------------------------

Ross Alexander                           "He knows no more about his
MIS - NEC Europe Limited            destiny than a tea leaf knows
Work ph: +44 20 8752 3394         the history of East India Company"


|---------+--------------------------------->
|         |           Lutz Jaenicke         |
|         |           <[EMAIL PROTECTED]|
|         |           Cottbus.DE>           |
|         |           Sent by:              |
|         |           owner-openssl-dev@open|
|         |           ssl.org               |
|         |                                 |
|         |                                 |
|         |           10/06/2002 15:46      |
|         |           Please respond to     |
|         |           openssl-dev           |
|         |                                 |
|---------+--------------------------------->
  
>-------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                         |
  |       To:       [EMAIL PROTECTED]                                            
                         |
  |       cc:                                                                          
                         |
  |       Subject:  Re: Various patches for 0.9.6d and 0.9.7-beta1                     
                         |
  
>-------------------------------------------------------------------------------------------------------------|




On Mon, Jun 10, 2002 at 03:44:07PM +0100, [EMAIL PROTECTED]
wrote:
>
> > So the entries you supplied are for gcc (hppa64-hp-hpux11.00)?
> > Is there a way for "config" to find out itself? Please have a look
> > into "config" and search for GCC_ARCH to see what I mean.
>
> Sure.  It will take me a couple of days.  In GCC 3.1 gcc --version
> doesn't work the same way so I will looking at gcc -v | egrep "^gcc
> version"
> to do the same job.

Please load down a current snapshot. GCC-3.1 support for --version should
be added.

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]





______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to