Subject: pkg/16421: pkgsrc/graphics/xpm doesn't work on sparc64
To: None <gnats-bugs@gnats.netbsd.org>
From: Lloyd Parkes <lloyd@must-have-coffee.gen.nz>
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
>Closed-Date:
>Last-Modified:
>Originator:     Lloyd Parkes
>Release:        NetBSD 1.5ZB
>Organization:
Must Have Coffee
>Environment:
System: NetBSD archangel.must-have-coffee.gen.nz 1.5ZB NetBSD 1.5ZB (Archangel) #0: Wed Mar 13 17:37:30 NZDT 2002 lloyd@archangel.must-have-coffee.gen.nz:/usr/src/sys/arch/sparc64/compile/Archangel sparc64
Architecture: sparc64
Machine: sparc64
>Description:

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

>How-To-Repeat:

Try building xemacs-current.

>Fix:

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.

$NetBSD$

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

>Release-Note:
>Audit-Trail:
>Unformatted:
 pkgsrc is current as of Sat Apr 20 11:50:57 NZST 2002