Subject: pkg/16421: pkgsrc/graphics/xpm doesn't work on sparc64
To: None <>
From: Lloyd Parkes <>
List: netbsd-bugs
Date: 04/20/2002 11:56:56
>Number:         16421
>Category:       pkg
>Synopsis:       NetBSD/sparc64 isn't identified as LP64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 19 16:57:00 PDT 2002
>Originator:     Lloyd Parkes
>Release:        NetBSD 1.5ZB
Must Have Coffee
System: NetBSD 1.5ZB NetBSD 1.5ZB (Archangel) #0: Wed Mar 13 17:37:30 NZDT 2002 sparc64
Architecture: sparc64
Machine: sparc64

NetBSD/sparc64 isn't detected as a 64 bit environment (LONG64),
causing xpm to fail to byte swap it often generates SIGBUS.


Try building xemacs-current.


The following patch may well fix the problem for all NetBSD LP64
platforms past, present and future. I have added it as patch-ad. It
has only been tested on NetBSD/sparc64. My Alpha is switched off in
the garage somewhere. 

I someone (not me) needs to ensure that our xsrc defines the symbol
LONG64 appropriately, and that the copy of xpm in Open Motif is
similarly fixed.


--- lib/XpmI.h~	Sat Apr 20 11:39:28 2002
+++ lib/XpmI.h	Sat Apr 20 11:40:29 2002
@@ -82,7 +82,7 @@
 /* the following is defined in X11R6 but not in previous versions */
-#ifdef __alpha
+#if defined (__alpha) || defined (__arch64__)
 #ifndef LONG64
 #define LONG64

 pkgsrc is current as of Sat Apr 20 11:50:57 NZST 2002