NetBSD/tools
bjh21 4be7a2dcf3 Add a new feature-test macro, _NETBSD_SOURCE. If this is defined
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.
2003-04-28 23:16:11 +00:00
..
asn1_compile Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
autoconf Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
binstall Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
cap_mkdb Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
cat Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
cksum Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
compat Add a new feature-test macro, _NETBSD_SOURCE. If this is defined 2003-04-28 23:16:11 +00:00
compile_et Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
config Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
crunchgen Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
ctags Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
dbsym
fgen Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
file build file(1) as a host tool (for compiling magic files) 2003-03-25 23:43:49 +00:00
gencat Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
gettext Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
groff replace DIST with GNUHOSTDIST, and don't unconditionally define it 2003-02-07 01:52:51 +00:00
hexdump Make hexdump a host tool. 2003-03-07 01:14:30 +00:00
host-mkdep Allow "-no-cpp-precomp", which disables use of pre-compiled headers 2003-03-13 04:40:45 +00:00
installboot Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
lex Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
lint
lint1
lint2
lorder Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
m4 Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
make Check for <poll.h>. If it is not found, -DUSE_SELECT=1. 2002-10-04 22:21:57 +00:00
makefs Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
makewhatis Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
mdsetimage
menuc Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
mips-elf2ecoff Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
mkdep Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
mklocale Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
mktemp Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
msgc Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
mtree Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
pax Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
prep-mkbootimage Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
pwd_mkdb Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
rpcgen Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
sunlabel Build with -DNO_S_COMMAND. We don't need to set the in-core label 2003-01-27 01:25:07 +00:00
texinfo Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
toolchain extract the bintils VERSION. 2003-03-05 06:17:17 +00:00
tsort Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
uudecode Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
yacc Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
zic Centralize the definition of the tool name prefix (i.e. "nb") into 2002-12-08 20:19:56 +00:00
Makefile build file(1) as a host tool (for compiling magic files) 2003-03-25 23:43:49 +00:00
Makefile.gnuhost Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX. 2003-03-14 05:22:50 +00:00
Makefile.gnuwrap Put -X into MAKEFLAGS on FreeBSD and Mac OS X; they have a small ARG_MAX. 2003-03-14 05:22:50 +00:00
Makefile.host Move -no-cpp-precomp logic to defs.mk. 2003-03-13 05:15:49 +00:00