From akiyama@kme.mei.co.jp  Thu Dec 12 02:05:14 1996
Received: from vcgate2.mei.co.jp (vcgate2.mei.co.jp [202.32.14.52])
          by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id CAA03340
          for <freebsd-gnats-submit@freebsd.org>; Thu, 12 Dec 1996 02:05:10 -0800 (PST)
Received: by vcgate2.mei.co.jp (8.7.5+2.6Wbeta7/5.9:4.9:vcgate0:961204)
	id TAA05761; Thu, 12 Dec 1996 19:05:06 +0900 (JST)
Received: by vcmei.vanc.mei.co.jp (5.65mei1.1/5.9:4.9:vcmei:961209)
	id AA11693; Thu, 12 Dec 96 19:04:59 +0900
Received: by kmegate.kme.mei.co.jp (4.1/5.5:4.6:kmegate:961205)
	id AA01704; Thu, 12 Dec 96 19:04:48 JST
Message-Id: <9612121004.AA01704@kmegate.kme.mei.co.jp>
Date: Thu, 12 Dec 96 19:04:48 JST
From: akiyama@kme.mei.co.jp
Reply-To: akiyama@kme.mei.co.jp
To: FreeBSD-gnats-submit@freebsd.org
Subject: function prototype mismatch breaks make world.
X-Send-Pr-Version: 3.2

>Number:         2197
>Category:       bin
>Synopsis:       function prototype mismatch breaks make world.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec 12 02:10:01 PST 1996
>Closed-Date:    Thu Dec 12 23:37:14 PST 1996
>Last-Modified:  Thu Dec 12 23:37:30 PST 1996
>Originator:     Shunsuke Akiyama
>Release:        FreeBSD 2.2-ALPHA i386
>Organization:
Kyushu Matsushita Electric Co., LTD.
>Environment:

	All FreeBSD 2.2-ALPHA systems.

>Description:

	functional prototype of malloc() is not match between standard
	header declaration and sources of /usr/bin/fmt and
	/usr/games/adventure.
	This breaks making all binaries at /usr/src.

>How-To-Repeat:

	# cd /usr/src
	# make all

>Fix:
	
===================================================================
--- games/adventure/hdr.h	1996/10/20 13:45:46
+++ games/adventure/hdr.h	1996/10/20 13:46:30
@@ -156,7 +156,7 @@
 
 int demo,newloc,limit;
 
-char *malloc();
+void *malloc();
 char *decr();
 unsigned long crc();
 
===================================================================
--- usr.bin/fmt/fmt.c	1996/11/27 14:56:25
+++ usr.bin/fmt/fmt.c	1996/11/27 14:58:55
@@ -70,7 +70,7 @@
 int	mark;			/* Last place we saw a head line */
 int	center;
 
-char	*malloc();		/* for lint . . . */
+void	*malloc();		/* for lint . . . */
 char	*headnames[] = {"To", "Subject", "Cc", 0};
 
 /*

>Release-Note:
>Audit-Trail:

From: Bruce Evans <bde@zeta.org.au>
To: akiyama@kme.mei.co.jp, FreeBSD-gnats-submit@freebsd.org
Cc:  Subject: Re: bin/2197: function prototype mismatch breaks make world.
Date: Fri, 13 Dec 1996 00:27:32 +1100

 >>Environment:
 >
 >	All FreeBSD 2.2-ALPHA systems.
 
 Not all :-).
 
 >>Description:
 >
 >	functional prototype of malloc() is not match between standard
 >	header declaration and sources of /usr/bin/fmt and
 >	/usr/games/adventure.
 >	This breaks making all binaries at /usr/src.
 
 gcc apparently has a kludge to hide this bug.  It apparently looks at the
 names of the headers.  The following compiles with no warnings even with
 cc -ansi -pedantic:
 
 a.c:
 	char *malloc();
 	#include <stdlib.h>
 
 The following compiles with just one diagnostic with cc -ansi -pedantic:
 
 b.c:
 	#include <stdlib.h>
 	char *malloc();
 
 The output of the following still compiles:
 
 	cc -E b.c >c.c
 
 The output of the following doesn't compile:
 
 	cc -E -P b.c >d.c
 
 Bruce
State-Changed-From-To: open->closed 
State-Changed-By: jkh 
State-Changed-When: Thu Dec 12 23:37:14 PST 1996 
State-Changed-Why:  
Fixed. 
>Unformatted:
