Subject: lib/26077: Defining _XOPEN_SOURCE_EXTENDED breaks signal.h
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kristerw@netbsd.org>
List: netbsd-bugs
Date: 06/27/2004 00:55:12
>Number:         26077
>Category:       lib
>Synopsis:       Defining _XOPEN_SOURCE_EXTENDED breaks signal.h
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 27 00:56:03 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Krister Walfridsson
>Release:        NetBSD 2.0_BETA as of 2004-06-23
>Organization:
	
>Environment:
	
	
System: NetBSD pc20.kwa 2.0_BETA NetBSD 2.0_BETA (GENERIC) #0: Fri Jun 25 18:44:27 UTC 2004  autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/i386/OBJ/autobuild/netbsd-2-0/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
Defining _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED before including
signal.h makes it declare a couple of functions that have parameters
of type siginfo_t.  It does however not define siginfo_t...

This breaks some programs, e.g. gcc-current.

>How-To-Repeat:
pc20> cat > foo.c 
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE_EXTENDED 1
#include <signal.h>
pc20> gcc -c foo.c 
In file included from foo.c:3:
/usr/include/signal.h:183: error: parse error before "siginfo_t"
/usr/include/signal.h:186: error: parse error before "siginfo_t"
/usr/include/signal.h:188: error: parse error before "siginfo_t"

	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted: