Subject: bin/8365: 19990909 compile failures in cribbage, monop games
To: None <gnats-bugs@gnats.netbsd.org>
From: None <John.P.Darrow@wheaton.edu>
List: netbsd-bugs
Date: 09/09/1999 16:35:49
>Number: 8365
>Category: bin
>Synopsis: 19990909 compile failures in cribbage, monop games
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 9 16:35:01 1999
>Last-Modified:
>Originator: John Darrow
>Organization:
Computing Services
Wheaton College, Wheaton, IL
>Release: current-19990909
>Environment:
System: NetBSD jdarrowp5.wheaton.edu 1.4K NetBSD 1.4K (JDARROWP5) #0: Thu Sep 9 13:13:41 CDT 1999 jdarrow@jdarrowp5.wheaton.edu:/var/src/sys/arch/i386/compile/JDARROWP5 i386
>Description:
The merge of the const changes from the linux port of the BSD games
had a couple of glitches. First, the prototype for isone in
cribbage.h was erroneously changed to is_one, thus causing the
first reference in the code (cards.c) to fail with:
cards.c:108: warning: function declaration isn't a prototype
Second, in monop.def, the name_list array (which gets written into)
was included with the other char * arrays which were made const,
causing a warning about strcpy discarding const from the target
pointer (which then stopped the build due to -Werror).
>How-To-Repeat:
make build, wait a while, come back to 'Stop.'
>Fix:
(These changes should probably also be rechecked in the linux port...)
Index: /var/src/games/cribbage/cribbage.h
===================================================================
RCS file: /source/cvs/netbsd/current/src/games/cribbage/cribbage.h,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 cribbage.h
--- cribbage.h 1999/09/09 16:21:59 1.1.1.2
+++ cribbage.h 1999/09/09 21:44:11
@@ -85,7 +85,7 @@
int incard __P((CARD *));
int infrom __P((const CARD [], int, const char *));
void instructions __P((void));
-int is_one __P((CARD, const CARD [], int));
+int isone __P((CARD, const CARD [], int));
void makeboard __P((void));
void makedeck __P((CARD []));
void makeknown __P((const CARD [], int));
Index: /var/src/games/monop/monop.def
===================================================================
RCS file: /source/cvs/netbsd/current/src/games/monop/monop.def,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 monop.def
--- monop.def 1999/09/09 16:22:44 1.1.1.3
+++ monop.def 1999/09/09 22:52:03
@@ -43,8 +43,8 @@
told_em, /* set if told user he's out of debt */
spec; /* set if moving by card to RR or UTIL */
-const char *name_list[MAX_PL+2], /* list of players' names */
- *const comlist[] = { /* list of normal commands */
+char *name_list[MAX_PL+2]; /* list of players' names */
+const char *const comlist[] = { /* list of normal commands */
"quit", /* 0 */ "print", /* 1 */
"where", /* 2 */ "own holdings", /* 3 */
"holdings", /* 4 */ "mortgage", /* 5 */
>Audit-Trail:
>Unformatted: