summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-09-30 20:00:38 -0400
committerRich Felker <dalias@aerifal.cx>2012-09-30 20:00:38 -0400
commit030e52639248ac8417a4934298caa78c21a228d1 (patch)
treeb35e1d3893f3b9db44dd006d1ef944057e9f1906 /include
parente44849f5cf331e655705b18d6c81c616e29d50d0 (diff)
downloadmusl-030e52639248ac8417a4934298caa78c21a228d1.tar.gz
musl-030e52639248ac8417a4934298caa78c21a228d1.tar.bz2
musl-030e52639248ac8417a4934298caa78c21a228d1.tar.xz
musl-030e52639248ac8417a4934298caa78c21a228d1.zip
add getopt reset support
based on proposed patches by Daniel Cegiełka, with minor changes: - use a weak symbol for optreset so it doesn't clash with namespace - also reset optpos (position in multi-option arg like -lR) - also make getopt_long support reset
Diffstat (limited to 'include')
-rw-r--r--include/getopt.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/getopt.h b/include/getopt.h
index 6d85c0b6..c1d0df92 100644
--- a/include/getopt.h
+++ b/include/getopt.h
@@ -7,7 +7,7 @@ extern "C" {
int getopt(int, char * const [], const char *);
extern char *optarg;
-extern int optind, opterr, optopt;
+extern int optind, opterr, optopt, optreset;
struct option
{