Subject: problems with perl and sig* renaming
To: None <current-users@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: current-users
Date: 11/29/1998 05:07:29
I just ran into an interestig problem with perl. After fixing strtod
lossage in my toolchain, perl built OK, but failed a half-dozen tests
involving signalsp when I ran `make test
Turns out perl's util.c pulls in <sys/signal.h>, but does **not**
#include <signal.h>, since NSIG is already defined (from
<sys/signal.h>).
So perl';s signal-handling code ends up getting struct sigcontext from
sys/signal.h, but none of the _RENAME stuff. So perl calls the old
sigaction() with a new-style sigcontext. Which, not surprisingly, loses.
I dunno how we handle this. For now I've dinked util.c to do
#include <signal.h>
on NetBSD, even if NSIG is defined. (just add !defiend(__NetBSD__) to
the list of exceptions). But I wonder what other third-party code is
silently failing. Should we do
#ifndef _KERNEL
#include <signal.h>
#endif
in sys/signal.h, to avoid this? Does that conflict with POSIX?
What about other _RENAMES?