summaryrefslogtreecommitdiff
path: root/libc/unistd/getopt-susv3.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-02-03 16:19:05 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-02-03 16:19:05 +0000
commit0140324c106106878b6d90ebafda9bf50b45aac4 (patch)
tree563022bc3f8b6113b38679e1d3c8fcbe9258364f /libc/unistd/getopt-susv3.c
parent6b295db049fbca765345a9d1e564ba73090a8be1 (diff)
attribute_hidden is enough in the prototype, sync getopt-susv3 w/ gnu
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)
{