From schilling@fokus.gmd.de  Mon Nov 26 08:40:10 2001
Return-Path: <schilling@fokus.gmd.de>
Received: from mailhub.fokus.gmd.de (mailhub.fokus.gmd.de [193.174.154.14])
	by hub.freebsd.org (Postfix) with ESMTP id 83D2437B417
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Nov 2001 08:40:09 -0800 (PST)
Received: from fokus.gmd.de (beagle [193.175.132.100])
	by mailhub.fokus.gmd.de (8.11.6/8.11.6) with ESMTP id fAQGe8r09988
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 26 Nov 2001 17:40:08 +0100 (MET)
Received: (from jes@localhost)
	by fokus.gmd.de (8.11.6/8.11.0) id fAQGe8K10898;
	Mon, 26 Nov 2001 17:40:08 +0100 (CET)
	(envelope-from jes)
Message-Id: <200111261640.fAQGe8K10898@fokus.gmd.de>
Date: Mon, 26 Nov 2001 17:40:08 +0100 (CET)
From: Joerg Schilling <schilling@fokus.gmd.de>
Reply-To: Joerg Schilling <schilling@fokus.gmd.de>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: brk() has illegal prototype
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32296
>Category:       misc
>Synopsis:       brk() has illegal prototype
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    dwmalone
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Nov 26 08:50:01 PST 2001
>Closed-Date:    Mon Mar 4 04:01:32 PST 2002
>Last-Modified:  Mon Mar 04 04:02:13 PST 2002
>Originator:     Joerg Schilling
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
FhG FOKUS
>Environment:
System: FreeBSD beagle.fokus.gmd.de 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Mon Nov 26 12:48:36 CET 2001 hbb@beagle.fokus.gmd.de:/opt/obj/usr/src/sys/BEAGLE i386


	
>Description:
	
>How-To-Repeat:
	
>Fix:

	


brk() always have been returning int and is supposed tto return int by the
standard http://www.opengroup.org/onlinepubs/7908799/xsh/brk.html

FreeBSD returns char * instead....

>Release-Note:
>Audit-Trail:

From: David Malone <dwmalone@maths.tcd.ie>
To: Joerg Schilling <schilling@fokus.gmd.de>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: misc/32296: brk() has illegal prototype
Date: Mon, 26 Nov 2001 17:51:14 +0000

 On Mon, Nov 26, 2001 at 05:40:08PM +0100, Joerg Schilling wrote:
 > brk() always have been returning int and is supposed tto return int by the
 > standard http://www.opengroup.org/onlinepubs/7908799/xsh/brk.html
 > 
 > FreeBSD returns char * instead....
 
 brk seems to have been returning a char * on BSD for at least the
 last 10 years. It makes more sense for it to return an int, but
 that could cause binary compatability problems for platforms where
 an int and a char * are not the same size (eg. the alpha).
 
 What problems are you seeing with the current implimentation? The
 only problem I can think of is that it will cause compiler warnings
 if you do:
 
 	if (brk(ptr) == -1)
 
 or if you try to redeclare brk.
 
 	David.
Responsible-Changed-From-To: freebsd-bugs->dwmalone 
Responsible-Changed-By: dwmalone 
Responsible-Changed-When: Mon Nov 26 12:03:13 PST 2001 
Responsible-Changed-Why:  
I'll worry about if we can change brk's prototype or not. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32296 

From: Bruce Evans <bde@zeta.org.au>
To: David Malone <dwmalone@maths.tcd.ie>
Cc: <freebsd-gnats-submit@FreeBSD.ORG>
Subject: Re: misc/32296: brk() has illegal prototype
Date: Wed, 28 Nov 2001 20:04:27 +1100 (EST)

 On Mon, 26 Nov 2001, David Malone wrote:
 
 >  On Mon, Nov 26, 2001 at 05:40:08PM +0100, Joerg Schilling wrote:
 >  > brk() always have been returning int and is supposed tto return int by the
 >  > standard http://www.opengroup.org/onlinepubs/7908799/xsh/brk.html
 >  >
 >  > FreeBSD returns char * instead....
 >
 >  brk seems to have been returning a char * on BSD for at least the
 >  last 10 years. It makes more sense for it to return an int, but
 
 Probably for the last 20+ years.  It returned char * in V7 according to
 my manuals.
 
 Bruce
 
State-Changed-From-To: open->closed 
State-Changed-By: dwmalone 
State-Changed-When: Mon Mar 4 04:01:32 PST 2002 
State-Changed-Why:  
Prototypes have now been changed in -current and -stable. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=32296 
>Unformatted:
