declaration for pthread_st isn't necessary (and is why I missed that
it was necessary before, as I already had the sys/types.h change in my
local tree).
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.
This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.
I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.
Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
const char *const *, and rename them to __sys_siglist14 and __sys_signame14.
This will prevent the size of the exported symbol from changing when more
signals are added to the list.
instead of _NSIG for now; we need to change these to char **'s, and do
a symbol renaming trick on them, eventually (a'la what Todd did with
libbfd's target match array).
they were POSIX.1 compliant, because users have misinterpreted the spec and
have written programs that depend on -1 being returned when a signal number
is out of range. This made initialization of signal masks significantly
more expensive.
This change uses GCC's inline function extension to provide macro-like
signal mask manipulation functions. Since most of the time constants
like SIGINT is used, gcc is able to remove unused range checking code.
Gcc is also smart enough to coalesce adjacent sigemptyset(), sigaddset(),
sigdelset(), and sigfullset() calls into a single assignment.