From marcs@testbed.worldgate.com  Thu May  1 12:56:41 1997
Received: from testbed.worldgate.com (testbed.worldgate.com [198.161.84.16])
          by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA12459
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 1 May 1997 12:56:40 -0700 (PDT)
Received: (from marcs@localhost)
	by testbed.worldgate.com (8.8.5/8.8.5) id NAA15226;
	Thu, 1 May 1997 13:56:51 -0600 (MDT)
Message-Id: <199705011956.NAA15226@testbed.worldgate.com>
Date: Thu, 1 May 1997 13:56:51 -0600 (MDT)
From: marcs@znep.com
Reply-To: marcs@znep.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: RELENG_2_2 adventure has broken malloc declaration
X-Send-Pr-Version: 3.2

>Number:         3459
>Category:       bin
>Synopsis:       RELENG_2_2 adventure has broken malloc declaration
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May  1 13:00:02 PDT 1997
>Closed-Date:    Tue May 13 16:41:16 PDT 1997
>Last-Modified:  Tue May 13 16:42:24 PDT 1997
>Originator:     Marc Slemko
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
>Environment:

Latest RELENG_2_2 tree as of 97/05/01

>Description:

Is a broken declaration of malloc in games/adventure/hdr.h that 
causes make world to die when using DESTDIR.  gcc has a hack to 
avoid the problem normally, but when using a different include 
directory it still shows up.


cc -O -m486 -pipe -traditional-cpp   -I/mnt/usr/include -c /misc1/src/games/adventure/init.c
In file included from /misc1/src/games/adventure/init.c:49:
/misc1/src/games/adventure/hdr.h:159: conflicting types for `malloc'
/mnt/usr/include/stdlib.h:98: previous declaration of `malloc'
*** Error code 1

Stop.

Script done on Thu May  1 13:55:30 1997

>How-To-Repeat:

Do a 

	make world DESTDIR=/foo

on a RELENG_2_2 system.

>Fix:
	
cvs diff: Diffing .
Index: hdr.h
===================================================================
RCS file: /usr/cvs/src/games/adventure/hdr.h,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 hdr.h
*** hdr.h	1994/09/04 04:02:21	1.1.1.1
--- hdr.h	1997/05/01 19:56:19
***************
*** 156,162 ****
  
  int demo,newloc,limit;
  
- char *malloc();
  char *decr();
  unsigned long crc();
  
--- 156,161 ----
Index: vocab.c
===================================================================
RCS file: /usr/cvs/src/games/adventure/vocab.c,v
retrieving revision 1.2
diff -c -r1.2 vocab.c
*** vocab.c	1996/03/13 23:38:21	1.2
--- vocab.c	1997/05/01 19:49:52
***************
*** 43,48 ****
--- 43,49 ----
  /*      Re-coding of advent in C: data structure routines               */
  
  #include <stdio.h>
+ #include <stdlib.h>
  # include "hdr.h"
  
  dstroy(object)
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->freebsd-bugs 
Responsible-Changed-By: max 
Responsible-Changed-When: Sat May 3 18:49:12 PDT 1997 
Responsible-Changed-Why:  
Misfiled pr. 
State-Changed-From-To: open->closed 
State-Changed-By: alex 
State-Changed-When: Tue May 13 16:41:16 PDT 1997 
State-Changed-Why:  
Fixed by jkh, merged into 2.2 by asami. 
>Unformatted:
