Subject: pkg/19765: security/pgp2 LP64 patch
To: None <gnats-bugs@gnats.netbsd.org>
From: john heasley <heas@shrubbery.net>
List: netbsd-bugs
Date: 01/09/2003 23:47:53
>Number:         19765
>Category:       pkg
>Synopsis:       security/pgp2 LP64 patch
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 09 15:48:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     john heasley
>Release:        NetBSD 1.6K
>Organization:
>Environment:
System: NetBSD guelah 1.6K NetBSD 1.6K (guelah) #9: Mon Dec 30 19:01:40 UTC 2002 root@guelah:/sys/arch/sparc64/compile/guelah sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	It appears there pkgsrc/security/pgp2 was already patched for
	alpha as a special case, but not sparc64.  thus some variables
	which were supposed to be 32 bits, were 64 resulting is misc
	errors.
>How-To-Repeat:
	use pgp2 on sparc64, get BUS errors, etc.
>Fix:
	this patch might not address all the problems, but pgp2 does work
	for me with these.  the __alpha specifics could probably be removed.

*** md5.h.orig	Mon Aug  1 15:12:18 1994
--- md5.h	Thu Jan  9 23:30:04 2003
***************
*** 1,10 ****
  #ifndef MD5_H
  #define MD5_H
  
! #ifdef __alpha
! typedef unsigned int uint32;
  #else
  typedef unsigned long uint32;
  #endif
  
  struct MD5Context {
--- 1,14 ----
  #ifndef MD5_H
  #define MD5_H
  
! #ifdef __NetBSD__
! typedef uint32_t uint32;
  #else
+ # ifdef __alpha
+ typedef unsigned int uint32;
+ # else
  typedef unsigned long uint32;
+ # endif
  #endif
  
  struct MD5Context {
*** usuals.h.orig	Thu Jan  9 23:36:30 2003
--- usuals.h	Thu Jan  9 23:36:03 2003
***************
*** 15,24 ****
  typedef byte *byteptr;	/* pointer to byte */
  typedef char *string;	/* pointer to ASCII character string */
  typedef unsigned short word16;	/* values are 0-65535 */
! #ifdef __alpha
! typedef unsigned int word32;	/* values are 0-4294967295 */
  #else
  typedef unsigned long word32;	/* values are 0-4294967295 */
  #endif
  
  #ifndef TRUE
--- 15,28 ----
  typedef byte *byteptr;	/* pointer to byte */
  typedef char *string;	/* pointer to ASCII character string */
  typedef unsigned short word16;	/* values are 0-65535 */
! #ifdef __NetBSD__
! typedef uint32_t word32;	/* values are 0-4294967295 */
  #else
+ # ifdef __alpha
+ typedef unsigned int word32;	/* values are 0-4294967295 */
+ # else
  typedef unsigned long word32;	/* values are 0-4294967295 */
+ # endif
  #endif
  
  #ifndef TRUE
>Release-Note:
>Audit-Trail:
>Unformatted: