summaryrefslogtreecommitdiff
path: root/libc/unistd/getopt-susv3.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/unistd/getopt-susv3.c')
-rw-r--r--libc/unistd/getopt-susv3.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc/unistd/getopt-susv3.c b/libc/unistd/getopt-susv3.c
index 0d57dce20..32f699a8e 100644
--- a/libc/unistd/getopt-susv3.c
+++ b/libc/unistd/getopt-susv3.c
@@ -33,6 +33,7 @@
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+#include <getopt.h>
libc_hidden_proto(fprintf)
libc_hidden_proto(strchr)
@@ -53,10 +54,18 @@ static const char missing[] = "%s: option requires an argument -- %c\n";
static const char illegal[] = "%s: illegal option -- %c\n";
#endif
+libc_hidden_proto(opterr)
int opterr = 1;
+libc_hidden_data_def(opterr)
+libc_hidden_proto(optind)
int optind = 1;
+libc_hidden_data_def(optind)
+libc_hidden_proto(optopt)
int optopt = 0;
+libc_hidden_data_def(optopt)
+libc_hidden_proto(optarg)
char *optarg = NULL;
+libc_hidden_data_def(optarg)
int getopt(int argc, char * const argv[], const char *optstring)
{