Home | History | Annotate | Download | only in include
History log of /src/include/getopt.h
RevisionDateAuthorComments
 1.11  28-Apr-2008  martin branches: 1.11.10;
Remove clause 3 and 4 from TNF licenses
 1.10  08-Nov-2007  christos branches: 1.10.6;
revert the reversion of the previous change. Kill _NETBSD_SOURCE again.
 1.9  07-Nov-2007  dogcow Revert the other part of the getopt_long changes to fix non-NetBSD builds;
viz -r1.22 -r1.23 src/lib/libc/stdlib/getopt_long.c
 1.8  06-Nov-2007  christos remove featuretest.h and NETBSD_SOURCE conditional ifdefs. This is not
a standard header and does not have namespace issues.
 1.7  03-Feb-2005  perry branches: 1.7.16;
de-__P -- the hack is long since useless. Discussed with christos,
matt, kleink, others. Approved by christos.
 1.6  20-Jun-2004  jmc Completely rework how tools/compat is done. Purge all uses/references to
_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
 1.5  28-Apr-2003  bjh21 branches: 1.5.2;
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.
 1.4  07-Jul-2000  ad Pull in <sys/cdefs.h>, since we're using __BEGIN_DECLS/__END_DECLS.
 1.3  02-Apr-2000  christos Include <unistd.h> to get the rest of the getopt goo.
 1.2  02-Apr-2000  christos backout previous. the definition of struct option caused too many namespace
collisions. Instead, define getopt_long in getopt.h and getopt in unistd.h
where it belongs.
 1.1  01-Apr-2000  christos Add getopt.h and collect all the getopt related stuff here.
Make unistd.h include <getopt.h> to get the getopt stuff.
This adds support for getopt_long from Dieter Baron and Thomas Klausner.
 1.5.2.1  22-Jun-2004  tron Pull up revision 1.6 (requested by jmc in ticket #527):
Completely rework how tools/compat is done. Purge all uses/references to
_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
 1.7.16.1  09-Jan-2008  matt sync with HEAD
 1.10.6.1  18-May-2008  yamt sync with head.
 1.11.10.2  28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.11.10.1  28-Apr-2008  martin file getopt.h was added on branch christos-time_t on 2008-04-28 20:22:55 +0000

RSS XML Feed