From scott@statsci.com  Thu Oct 12 16:10:00 1995
Received: from block.statsci.com (block.statsci.com [198.145.127.26])
          by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id QAA03596
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 12 Oct 1995 16:09:58 -0700
Received: (from scott@localhost) by block.statsci.com (8.6.12/8.6.9) id QAA03608; Thu, 12 Oct 1995 16:09:52 -0700
Message-Id: <199510122309.QAA03608@block.statsci.com>
Date: Thu, 12 Oct 1995 16:09:52 -0700
From: Scott Blachowicz <scott@statsci.com>
Reply-To: scott@statsci.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: undefined rune_t
X-Send-Pr-Version: 3.2

>Number:         779
>Category:       bin
>Synopsis:       #include <ctype.h> gets undefined 'rune_t' type.
>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 Oct 12 16:20:00 PDT 1995
>Closed-Date:    Sun May 26 23:26:00 PDT 1996
>Last-Modified:  Sun May 26 23:27:22 PDT 1996
>Originator:     Scott Blachowicz
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
StatSci division of Mathsoft, Inc
>Environment:

	Actually, this is a 2.1.0-950928-SNAP OS on a 486/66 system.

>Description:

	In building the GNU bc-1.03 package, I ran across this error (that I
isolated down to a foo.c file included below):

In file included from /usr/include/ctype.h:51,
                 from foo.c:3:
/usr/include/runetype.h:58: parse error before `rune_t'
/usr/include/runetype.h:58: warning: no semicolon at end of struct or union
/usr/include/runetype.h:59: warning: data definition has no type or storage class


>How-To-Repeat:

	My foo.c contained the following 3 lines:

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

    I compiled with 'cc -O -c foo.c'.

>Fix:
	
	Don't define _POSIX_SOURCE or modify /usr/include/runetype.h to make
sure rune_t is always defined (??).

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: scrappy 
State-Changed-When: Sun May 26 23:26:00 PDT 1996 
State-Changed-Why:  
Fixed by Bruce: 

revision 1.8 
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. 

>Unformatted:
