summaryrefslogtreecommitdiff
path: root/include/getopt.h
AgeCommit message (Collapse)Author
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2007-11-08revert the reversion of the previous change. Kill _NETBSD_SOURCE again.christos
2007-11-07Revert the other part of the getopt_long changes to fix non-NetBSD builds;dogcow
viz -r1.22 -r1.23 src/lib/libc/stdlib/getopt_long.c
2007-11-06remove featuretest.h and NETBSD_SOURCE conditional ifdefs. This is notchristos
a standard header and does not have namespace issues.
2005-02-03de-__P -- the hack is long since useless. Discussed with christos,perry
matt, kleink, others. Approved by christos.
2004-06-20Completely rework how tools/compat is done. Purge all uses/references tojmc
_NETBSD_SOURCE as this makes cross building from older/newer versions of NetBSD harder, not easier (and also makes the resulting tools 'different') Wrap all required code with the inclusion of nbtool_config.h, attempt to only use POSIX code in all places (or when reasonable test w. configure and provide definitions: ala u_int, etc). Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86 NetBSD current (x86 and amd64) and Solaris 9. Fixes PR's: PR#17762 PR#25944
2003-04-28Add a new feature-test macro, _NETBSD_SOURCE. If this is definedbjh21
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.
2000-07-07Pull in <sys/cdefs.h>, since we're using __BEGIN_DECLS/__END_DECLS.ad
2000-04-02Include <unistd.h> to get the rest of the getopt goo.christos
2000-04-02backout previous. the definition of struct option caused too many namespacechristos
collisions. Instead, define getopt_long in getopt.h and getopt in unistd.h where it belongs.
2000-04-01Add getopt.h and collect all the getopt related stuff here.christos
Make unistd.h include <getopt.h> to get the getopt stuff. This adds support for getopt_long from Dieter Baron and Thomas Klausner.