From owner-freebsd-bugs Wed Nov 29 17:50:53 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id RAA12316 for bugs-outgoing; Wed, 29 Nov 1995 17:50:53 -0800 Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id RAA12290 for ; Wed, 29 Nov 1995 17:50:45 -0800 Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA15056; Wed, 29 Nov 1995 20:50:06 -0500 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Wed, 29 Nov 1995 20:50 EST Received: (rivers@localhost) by ponds.UUCP (8.6.11/8.6.5) id MAA00373; Wed, 29 Nov 1995 12:31:02 -0500 Date: Wed, 29 Nov 1995 12:31:02 -0500 From: Thomas David Rivers Message-Id: <199511291731.MAA00373@ponds.UUCP> To: freebsd-bugs@freefall.FreeBSD.org, freebsd-hackers@freefall.FreeBSD.org, rivers@dg-rtp.dg.com Subject: Strangeness in /usr/include/runetype.h? Content-Type: text Content-Length: 1474 Sender: owner-bugs@FreeBSD.ORG Precedence: bulk I've found an interesting situation, try compiling the following file with -D_POSIX_SOURCE defined: ------------ start ------------- #include #include #include ------------ end ------------- You'll get: In file included from /usr/include/ctype.h:51, from t.c:4: /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 ... indicating 'rune_t' wasn't defined. There is a note in /usr/include/machine/ansi.h: * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_t * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains * defined for ctype.h. */ #define _BSD_WCHAR_T_ int /* wchar_t */ #define _BSD_RUNE_T_ int /* rune_t */ And, finally, in /usr/include/runetype.h we have: #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ rune_t; typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #endif my suggestion is that this becomes: #ifdef _BSD_WCHAR_T_ typedef _BSD_WCHAR_T_ rune_t; typedef _BSD_WCHAR_T_ wchar_t; #undef _BSD_WCHAR_T_ #else typedef _BSD_RUNE_T_ rune_t; #endif I discovered this on a 2.0.5 system, but I looked on freefall.cdrom.com (which claims to be running 2.1-STABLE) and discovered this hasn't changed there. - Dave Rivers -