etc.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mrg@eterna.com.au>
List: netbsd-bugs
Date: 11/25/1999 21:10:19
>Number: 8879
>Category: standards
>Synopsis: _POSIX_SOURCE, fd_set, <unistd.h> etc.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: standards-manager (NetBSD Standards Conformance bug manager)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 25 21:09:01 1999
>Last-Modified:
>Originator: matthew green
>Organization:
people's front against (bozotic) www (softwar foundation)
>Release: <NetBSD-current source date>today
>Environment:
System: NetBSD towers-of-dub.eterna.com.au 1.4M NetBSD 1.4M (_towers_) #32: Fri Nov 19 21:07:44 EST 1999 mrg@towers-of-dub.eterna.com.au:/orb/y/_towers_ alpha
>Description:
while building GCC's `protoize' i noticed that it does this:
#define _POSIX_SOURCE
#include <sys/types.h>
#include <unistd.h>
which leads to a compile-time error as <sys/types.h> does not
include definitions for fd_set if _POSIX_SOURCE, however the
prototype for select() is visible if _POSIX_SOURCE is set, and
it uses fd_set. <unistd.h> does not provide a select prototype
for several cases, particularly when _POSIX_C_SOURCE is defined.
>How-To-Repeat:
pass this code to a NetBSD compiler:
#define _POSIX_SOURCE
#include <sys/types.h>
#include <unistd.h>
>Fix:
be consistent about what pre-processor macros do what wrt standards
and what is visible.
>Audit-Trail:
>Unformatted: