Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Peter Rye <prye@picu-sgh.demon.co.uk>
Subject: Re: pgp 5 on Alpha
Date: 1998/06/03	[thread overview]
Message-ID: <m31zt69oi4.fsf@picu-sgh.demon.co.uk> (raw)
In-Reply-To: 6l1rc1$5t8$1@ppp393.ts.rz.tu-bs.de


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))





      reply	other threads:[~1998-06-03  4:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-06-02  4:00 pgp 5 on Alpha Olaf Schnapauff
1998-06-03  4:00 ` Peter Rye [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox