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 /lib/libc/stdlib/getopt_long.c | |
| 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 'lib/libc/stdlib/getopt_long.c')
| -rw-r--r-- | lib/libc/stdlib/getopt_long.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index 201ec142a80..4956ddc2cb1 100644 --- a/lib/libc/stdlib/getopt_long.c +++ b/lib/libc/stdlib/getopt_long.c @@ -1,4 +1,4 @@ -/* $NetBSD: getopt_long.c,v 1.16 2003/10/27 00:12:42 lukem Exp $ */ +/* $NetBSD: getopt_long.c,v 1.17 2004/06/20 22:20:15 jmc Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -36,9 +36,13 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#if HAVE_NBTOOL_CONFIG_H +#include "nbtool_config.h" +#endif + #include <sys/cdefs.h> #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: getopt_long.c,v 1.16 2003/10/27 00:12:42 lukem Exp $"); +__RCSID("$NetBSD: getopt_long.c,v 1.17 2004/06/20 22:20:15 jmc Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -46,7 +50,11 @@ __RCSID("$NetBSD: getopt_long.c,v 1.16 2003/10/27 00:12:42 lukem Exp $"); #include <assert.h> #include <err.h> #include <errno.h> +#if HAVE_NBTOOL_CONFIG_H +#include "compat_getopt.h" +#else #include <getopt.h> +#endif #include <stdlib.h> #include <string.h> |
