patch for cipher/sha512.c (u64 numbers)

David Shaw dshaw at jabberwocky.com
Sat May 10 20:12:02 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, May 10, 2003 at 11:24:24AM +0200, Werner Koch wrote:
> On Fri, 9 May 2003 16:05:01 -0400, David Shaw said:
> 
> > The point of using LL was to avoid a problem with compilers which do
> > support >=64-bit types, but truncate 64-bit constants to 32 bits if
> > there is no LL.  If doing this causes more breakage than help, then I
> > should reconsider.
> 
> What about detecting broken compilers and disabling the use of 64 but
> types in that case. We already detect whether a 64 bit type is
> supported and so we can simply conclude that a broken compiler is not
> capable of handling a 64 bit type.  The warning message might print an
> approriate hint (use gcc or fix your compiler).

That's what I did originally, but after reading Tim's message I
revised it to simply tag the integers to the same type underlying u64
(U, UL, ULL, or the magic macro for uint64_t).  It a lot simpler and
is more portable at the same time.  Plus, it doesn't cause problems
when cross-compiling.

David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: http://www.jabberwocky.com/david/keys.asc

iD8DBQE+vTLw4mZch0nhy8kRAjAlAKCizZHzk3muFlir/tVta3LUIawhrACdH+37
xUlmQ+LmUqbmrVw1vHcJYFw=
=+dH7
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list