From rwsys!hammy!gordon@lerami.lerctr.org  Thu Jul  6 15:36:52 1995
Received: from news.onramp.net (news.onramp.net [199.1.11.7])
          by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id PAA06236
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 6 Jul 1995 15:36:51 -0700
Received: from rwsys!hammy.UUCP (uucp@localhost) 
	by news.onramp.net (8.6.12/8.6.9) with UUCP id RAA21520 for FreeBSD-gnats-submit@freebsd.org; Thu, 6 Jul 1995 17:36:50 -0500
Received: by lerami.lerctr.org (/\oo/\ Smail3.1.29.1 #29.2)
	id <m0sTz6e-0000UIC@lerami.lerctr.org>; Thu, 6 Jul 95 17:09 CDT
Received: from hammy by rwsys.lonestar.org with uucp
	(Smail3.1.27.1 #1) id m0sTyTJ-0001TqC; Thu, 6 Jul 95 16:28 CDT
Received: by hammy.lonestar.org (Smail3.1.29.0 #1)
	id m0sTyR8-0001hkC; Thu, 6 Jul 95 16:26 CDT
Message-Id: <m0sTyR8-0001hkC@hammy.lonestar.org>
Date: Thu, 6 Jul 95 16:26 CDT
From: gordon@sneaky.lonestar.org
Reply-To: gordon@sneaky.lonestar.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: <ctype.h> and <stdlib.h> conflict with _POSIX_SOURCE
X-Send-Pr-Version: 3.2

>Number:         596
>Category:       i386
>Synopsis:       <ctype.h> and <stdlib.h> conflict with _POSIX_SOURCE
>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 Jul  6 15:40:01 1995
>Closed-Date:    Sun May 26 16:29:49 PDT 1996
>Last-Modified:  Sun May 26 16:30:35 PDT 1996
>Originator:     Gordon Burditt
>Release:        FreeBSD 2.0-BUILT-19950603 i386
>Organization:
what organization? 
>Environment:
	FreeBSD 2.0.5, gcc 2.6.3

>Description:

	If <stdlib.h> and <ctype.h> are both included with _POSIX_SOURCE
	defined, rune_t is not defined and this leads to a large
	bunch of errors in <ctype.h>.  (This problem surfaced with
	real code, but just the include files are needed to reproduce
	it.)

>How-To-Repeat:

	Compile the following 3-line program (cc -c x.c):

	# define _POSIX_SOURCE
	# include <stdlib.h>
	# include <ctype.h>

	and get a flood of error messages starting with complaints
	about rune_t (a typedef apparently not defined).

	however, this works:

	# define _POSIX_SOURCE
	# include <ctype.h>
	# include <stdlib.h>


>Fix:
	
	





>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: scrappy 
State-Changed-When: Sun May 26 16:29:49 PDT 1996 
State-Changed-Why:  

Recently fixed by Bruce, from log: 

date: 1996/05/01 00:39:55;  author: bde;  state: Exp;  lines: +14 -14 
Fixed longstanding namespace convolution involving rune_t vs wchar_t. 
If _ANSI_SOURCE or _POSIX_SOURCE is defined, then <ctype.h> had to 
be included before <stddef.h> or <stdlib.h> to get rune_t declared. 
Now rune_t is declared perfectly bogusly in all cases when <ctype.h> 
is included. 

This change breaks similar (but more convoluted) convolutions in the 
stddef.h in gcc distributions.  Ports of gcc should avoid using the 
gcc headers. 
>Unformatted:


