Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Nov 2001 21:42:41 -0800
From:      Peter Wemm <peter@wemm.org>
To:        Alexey Zelkin <phantom@freebsd.org>
Cc:        alpha@freebsd.org, dfr@freebsd.org
Subject:   Re: strtod cleanup (patch) 
Message-ID:  <20011123054241.EA66838CC@overcee.netplex.com.au>
In-Reply-To: <20011122184818.A44229@ark.cris.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
Alexey Zelkin wrote:
> hi,

> Most of this patch is mechanical merge, but I not sure
> on types usage correctness (long/int/int32_t) in this chunk:
> 
> #if BYTE_ORDER == BIG_ENDIAN
> #define IEEE_BIG_ENDIAN
> #define Long   int32_t
> #define ULong  u_int32_t
> #else
> #define IEEE_LITTLE_ENDIAN
> #define Long   long
> #define ULong  unsigned long
> #endif

This isn't quite right..  The #define Long int32_t etc should be used in
all cases, including i386.   The ia64 and alpha ports are little endian,
and work best with int32_t.

Also, maybe use:
typedef int32_t   Long;
typedef u_int32_t ULong;
.. that way there is no chance of preprocessor side effects with the space
in ULong.

Cheers,
-Peter
--
Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au
"All of this is for nothing if we don't go to the stars" - JMS/B5


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011123054241.EA66838CC>