Subject: pkg/19337: textproc/dict-server does not build all dictionaries on NetBSD/sparc
To: None <>
From: None <>
List: netbsd-bugs
Date: 12/10/2002 00:15:47
>Number:         19337
>Category:       pkg
>Synopsis:       textproc/dict-server does not build all dictionaries on NetBSD/sparc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 10 00:16:01 PST 2002
>Originator:     Sean Williams
>Release:        NetBSD/sparc 1.6_STABLE
NetBSD baal 1.6_STABLE NetBSD 1.6_STABLE (BAAL) #5: Sun Nov  3 00:36:31 EST 2002     sean@baal:/usr/src/sys/arch/sparc/compile/BAAL sparc

Two dictionaries, dict-gazetteer-1.3 and dict-web1913-1.4, fail to build.
The server program itself builds correctly as do all other dictionaries.

The affected source contains code designed to allow correct building on
SunOS and Solaris machines.
This code is activated solely by checking if '__sparc__' is defined.
This code is not appropriate for NetBSD.

Attempt to build textproc/dict-server under NetBSD/sparc.

$ cd /usr/pkgsrc/textproc/dict-server; make build

A suggested fix is to merely test that '__NetBSD__' is not defined
when the existing test against '__sparc__' is made.

The following patches correct the problem on my system:
--- ../dict-gazetteer-1.3/format.c.orig Mon Dec  9 17:29:09 2002
+++ ../dict-gazetteer-1.3/format.c
@@ -22,7 +22,7 @@
                                    This is usually clearer when
                                    searching. */

-#ifdef __sparc__
+#if defined(__sparc__) && !defined(__NetBSD__)
 extern int    atoi(char *);
 extern int    printf( char *, ... );
 extern int    fprintf( FILE *, char *, ... );
--- ../dict-web1913-1.4/dump.h.orig     Mon Dec  9 17:29:43 2002
+++ ../dict-web1913-1.4/dump.h
@@ -139,7 +139,7 @@ extern void     srandom( unsigned int );
 declarations for standard library calls.  We provide them here for
 situations that we know about. */

-#if defined(__sparc__)
+#if defined(__sparc__) && !defined(__NetBSD__)
                                /* Both SunOS and Solaris */
 extern int    getrusage( int who, struct rusage * );
 extern void   bcopy( const void *, void *, int );