From de693dcb58bc30ea44306c5aa2f6e4c092544afd Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Mon, 23 Feb 2004 04:51:07 +0000 Subject: [PATCH] Add optreset to getopt.h too since NetBSD getopt_long() (but not GNU one) use it too. --- include/getopt.h | 6 +++++- include/unistd.h | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/getopt.h b/include/getopt.h index c29ad4203a76..39b514ef9b2a 100644 --- a/include/getopt.h +++ b/include/getopt.h @@ -72,7 +72,11 @@ int getopt(int, char * const [], const char *); extern char *optarg; /* getopt(3) external variables */ extern int optind, opterr, optopt; -#endif /* _GETOPT_DECLARED */ +#endif +#ifndef _OPTRESET_DECLARED +#define _OPTRESET_DECLARED +extern int optreset; /* getopt(3) external variable */ +#endif __END_DECLS #endif /* !_GETOPT_H_ */ diff --git a/include/unistd.h b/include/unistd.h index 8901f935cac5..0331308bea83 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -542,7 +542,10 @@ int undelete(const char *); int unwhiteout(const char *); void *valloc(size_t); /* obsoleted by malloc() */ +#ifndef _OPTRESET_DECLARED +#define _OPTRESET_DECLARED extern int optreset; /* getopt(3) external variable */ +#endif #endif /* __BSD_VISIBLE */ __END_DECLS