Subject: lib/11557: stdlib.h unconditionally prototypes qdiv()
To: None <gnats-bugs@gnats.netbsd.org>
From: Richard Earnshaw <rearnsha@cambridge.arm.com>
List: netbsd-bugs
Date: 11/24/2000 02:45:11
>Number:         11557
>Category:       lib
>Synopsis:       stdlib.h unconditionally prototypes qdiv()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 24 02:45:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Richard Earnshaw
>Release:        NetBSD-current
>Organization:
ARM
-- 
>Environment:
	
System: NetBSD shark1 1.5H NetBSD 1.5H (SHARK) #57: Mon Oct 30 17:12:12 GMT 2000 rearnsha@shark1:/usr/src/sys/arch/arm32/compile/SHARK arm32


>Description:

	There is an internal inconsitency in stdlib.h: If any of
		_ANSI_SOURCE 
		_ISOC99_SOURCE
    		_POSIX_C_SOURCE
		_XOPEN_SOURCE
	are defined, the type qdiv_t is not.  Unfortunately, the qdiv 
	function prototype is not protected by the same tests, so we
	get an error.

>How-To-Repeat:

	Compile the following with gcc -c -D_ANSI_SOURCE:

	#include <stdlib.h>

>Fix:
	Wrap prototype for qdiv in the same conditionals as qdiv_t.
>Release-Note:
>Audit-Trail:
>Unformatted: