summaryrefslogtreecommitdiff
path: root/libc/unistd/getopt_vars.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-01-03 09:39:11 +0000
committerEric Andersen <andersen@codepoet.org>2002-01-03 09:39:11 +0000
commit24e8f0ec75bc5ac8a809c31fd553ff5e8eff5dc0 (patch)
tree80ebf3e76e5dfc7cc60a6361cda436b8b68641b4 /libc/unistd/getopt_vars.c
parentb53580e461f6d83a0d897c61c3c6681b621cf174 (diff)
Make getopt act the same regardless whether the app was staticly linked
or dynamicly linked. Obeys the principle of least surprise. -Erik
Diffstat (limited to 'libc/unistd/getopt_vars.c')
-rw-r--r--libc/unistd/getopt_vars.c40
1 files changed, 0 insertions, 40 deletions
diff --git a/libc/unistd/getopt_vars.c b/libc/unistd/getopt_vars.c
deleted file mode 100644
index 6dcb73ad7..000000000
--- a/libc/unistd/getopt_vars.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-
-/*
- * Getopt vars shared between getopt and gnu_getopt
- */
-
-/* For communication from `getopt' to the caller.
- When `getopt' finds an option that takes an argument,
- the argument value is returned here.
- Also, when `ordering' is RETURN_IN_ORDER,
- each non-option ARGV-element is returned here. */
-
-char *optarg = NULL;
-
-/* Index in ARGV of the next element to be scanned.
- This is used for communication to and from the caller
- and for communication between successive calls to `getopt'.
-
- On entry to `getopt', zero means this is the first call; initialize.
-
- When `getopt' returns EOF, this is the index of the first of the
- non-option elements that the caller should itself scan.
-
- Otherwise, `optind' communicates from one call to the next
- how much of ARGV has been scanned so far. */
-
-/* XXX 1003.2 says this must be 1 before any call. */
-int optind = 0;
-
-
-/* Callers store zero here to inhibit the error message
- for unrecognized options. */
-
-int opterr = 1;
-
-/* Set to an option character which was unrecognized.
- This must be initialized on some systems to avoid linking in the
- system's own getopt implementation. */
-
-int optopt = '?';