From owner-freebsd-current Thu Jul 6 22:03:05 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA16900 for current-outgoing; Thu, 6 Jul 1995 22:03:05 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id WAA16889 for ; Thu, 6 Jul 1995 22:02:53 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id PAA05751; Fri, 7 Jul 1995 15:01:15 +1000 Date: Fri, 7 Jul 1995 15:01:15 +1000 From: Bruce Evans Message-Id: <199507070501.PAA05751@godzilla.zeta.org.au> To: gordon@sneaky.lonestar.org Subject: Re: i386/596: \ and \ conflict with _POSIX_SOURCE Cc: current@freebsd.org Sender: current-owner@freebsd.org Precedence: bulk >>Synopsis: and conflict with _POSIX_SOURCE >>How-To-Repeat: > Compile the following 3-line program (cc -c x.c): > # define _POSIX_SOURCE > # include > # include > 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 > # include Oops. They also work individually, so they should work in any order if they are idempotent. They aren't idempotent. bases its decision to declare rune_t (and wchar_t) on the undefined'ness of _BSD_WCHAR_T_, but uses _BSD_WCHAR_T_ to control only wchar_t if either _POSIX_SOURCE or _ANSI_SOURCE is defined. Fix: there should be a separate guard _BSD_RUNE_T_ for rune_t. rune_t should not be declared if _POSIX_SOURCE is defined and only the above headers are included, but this is a different bug. The separate guard is required to make the following work: #define _POSIX_SOURCE #include #include #include Bruce