Subject: standards/7932: sbrk() man page and prototype violate XPG
To: None <gnats-bugs@gnats.netbsd.org>
From: None <perry@piermont.com>
List: netbsd-bugs
Date: 07/06/1999 09:50:56
>Number:         7932
>Category:       standards
>Synopsis:       sbrk() man page and prototype violate XPG
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    standards-manager (NetBSD Standards Conformance bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul  6 09:50:01 1999
>Last-Modified:
>Originator:     Perry E. Metzger
>Organization:
Perry Metzger		perry@piermont.com
--
"Ask not what your country can force other people to do for you."
>Release:        NetBSD-current
>Environment:
	
System: NetBSD jekyll.piermont.com 1.4 NetBSD 1.4 (JEKYLL) #0: Mon May 3 09:58:15 EDT 1999 perry@jekyll.piermont.com:/usr/src/sys/arch/i386/compile/JEKYLL i386


>Description:

XPG says:

	void *sbrk(intptr_t incr);

We say:

	char *sbrk(int incr);

This isn't right. We should probably fix it.
>How-To-Repeat:

man sbrk
fgrep sbrk /usr/include/unistd.h

>Fix:

I'd just change it if we can safely do that. Unfortunately, it appears 
that the function signatures may need to alter for machines where a
pointer is different shape from an int.

HOWEVER, since it appears that we may need to clean up sbrk anyway
(since right now its set up weirdly -- I'm sending another PR on
that), we might be able to fix some of it at least.
>Audit-Trail:
>Unformatted: