diff options
| author | jmc <jmc@NetBSD.org> | 2004-06-20 22:20:14 +0000 |
|---|---|---|
| committer | jmc <jmc@NetBSD.org> | 2004-06-20 22:20:14 +0000 |
| commit | b2f782612fe8c90c33dbac39f46b984e155e9d35 (patch) | |
| tree | 621fd229ae597b565c516ab4afd72b041cdfa672 /include/getopt.h | |
| parent | fa985b27a7846ade156387f98a002515d72661d9 (diff) | |
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
Diffstat (limited to 'include/getopt.h')
| -rw-r--r-- | include/getopt.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/getopt.h b/include/getopt.h index 46398d0718f..54ce7302142 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -1,4 +1,4 @@ -/* $NetBSD: getopt.h,v 1.5 2003/04/28 23:16:13 bjh21 Exp $ */ +/* $NetBSD: getopt.h,v 1.6 2004/06/20 22:20:14 jmc Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -46,7 +46,7 @@ /* * Gnu like getopt_long() and BSD4.4 getsubopt()/optreset extensions */ -#if defined(_NETBSD_SOURCE) +#if defined(_NETBSD_SOURCE) || defined(HAVE_NBTOOL_CONFIG_H) #define no_argument 0 #define required_argument 1 #define optional_argument 2 @@ -64,7 +64,9 @@ struct option { /* if flag not NULL, value to set *flag to; else return value */ int val; }; +#endif +#if defined(_NETBSD_SOURCE) __BEGIN_DECLS int getopt_long __P((int, char * const *, const char *, const struct option *, int *)); |
