* Re: pgp 5 on Alpha
1998-06-02 4:00 pgp 5 on Alpha Olaf Schnapauff
@ 1998-06-03 4:00 ` Peter Rye
0 siblings, 0 replies; 2+ messages in thread
From: Peter Rye @ 1998-06-03 4:00 UTC (permalink / raw)
Olaf Schnapauff <olaf@alpha.ts.rz.tu-bs.de> writes:
> did anybody get pgp 5 to compile on alpha?
Yes.
> it seems to me that
> HAVE64 is defined, resulting in word64 _not_ being typedef-ed right.
> I typdef-ed it in pgpUsuals.h but i am not certain I got it right. What should
> be word64 on an Alpha?
Yes, this is correct.
The references to word64 need to be changed to bnword64.
Previously, I seem to remember some glibc header related problems, but
these have been resolved with the later updates to glibc.
Here's a patch:
diff -uNr pgp50i.orig/src/lib/pgp/hash/pgpMD5.c pgp50i/src/lib/pgp/hash/pgpMD5.c
--- pgp50i.orig/src/lib/pgp/hash/pgpMD5.c Sat Aug 9 22:44:50 1997
+++ pgp50i/src/lib/pgp/hash/pgpMD5.c Wed Jun 3 22:00:49 1998
@@ -39,7 +39,7 @@
word32 key[MD5_BLOCKWORDS];
word32 iv[MD5_HASHWORDS];
#if HAVE64
- word64 bytes;
+ bnword64 bytes;
#else
word32 bytesLo, bytesHi;
#endif
diff -uNr pgp50i.orig/src/lib/pgp/hash/pgpSHA.c pgp50i/src/lib/pgp/hash/pgpSHA.c
--- pgp50i.orig/src/lib/pgp/hash/pgpSHA.c Sat Aug 9 22:44:51 1997
+++ pgp50i/src/lib/pgp/hash/pgpSHA.c Wed Jun 3 22:01:00 1998
@@ -46,7 +46,7 @@
word32 key[SHA_BLOCKWORDS];
word32 iv[SHA_HASHWORDS];
#if HAVE64
- word64 bytes;
+ bnword64 bytes;
#else
word32 bytesHi, bytesLo;
#endif
diff -uNr pgp50i.orig/src/lib/pgp/random/pgpRndPool.c pgp50i/src/lib/pgp/random/pgpRndPool.c
--- pgp50i.orig/src/lib/pgp/random/pgpRndPool.c Sat Aug 9 22:45:13 1997
+++ pgp50i/src/lib/pgp/random/pgpRndPool.c Wed Jun 3 22:01:20 1998
@@ -300,7 +300,7 @@
/* Inline asm goodies */
#define UMULH_32(r,a,b) __asm__("mull %2" : "=d"(r) : "%a"(a), "mr"(b) : "ax")
#elif HAVE64
-#define UMULH_32(r,a,b) ((r) = (word32)((word64)(a) * (b) >> 32))
+#define UMULH_32(r,a,b) ((r) = (word32)((bnword64)(a) * (b) >> 32))
#else
/* Underestimate the product */
#define UMULH_32(r,a,b) ((r) = ((a) >> 16) * ((b) >> 16))
^ permalink raw reply [flat|nested] 2+ messages in thread