Subject: port-m68k/26048: pollutes global namespace
To: None <gnats-bugs@gnats.NetBSD.org>
From: Ingolf Steinbach <027gwqp02@sneakemail.com>
List: netbsd-bugs
Date: 06/25/2004 00:59:57
>Number:         26048
>Category:       port-m68k
>Synopsis:       <signal.h> pollutes global namespace
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-m68k-maintainer
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 24 23:01:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ingolf Steinbach
>Release:        NetBSD 2.0_BETA
>Organization:
	none
>Environment:
System: NetBSD aphrodite 2.0_BETA NetBSD 2.0_BETA (INSTALL) #0: Sat Jun 12 16:56:01 UTC 2004 autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/amiga/OBJ/autobuild/netbsd-2-0/src/sys/arch/amiga/compile/INSTALL amiga
Architecture: m68k
Machine: amiga
>Description:
	Including <signal.h> introduces symbols in the global namespace
which can easily cause conflicts. This problem seems to apply to all
m68k architecture based machines running the 2004-06-12 snapshot of
NetBSD 2.0_BETA.

BTW, this problem is related to pkg/25969.
>How-To-Repeat:
	Try to compile the following C program:
/*----------------------*/
include <signal.h>
struct frame { int foo; };
int main() { return 0; }
/*----------------------*/

Compilation (with gcc) fails:
frame.c:2: error: redefinition of `struct frame'

The previous definition of struct frame came from /usr/include/m68k/cpuframe.h.
>Fix:
	Add suitable protection to some m68k header file.
>Release-Note:
>Audit-Trail:
>Unformatted: