summaryrefslogtreecommitdiffstats
path: root/libc/unistd/getopt-susv3.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 20:10:56 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-25 20:10:56 +0000
commitbd26ecdcebac54521f8e0e9fd0074db25d97ccfd (patch)
tree9435aaad0512b4512493246455a446692e44c1c2 /libc/unistd/getopt-susv3.c
parentbfcbb4284e479504186ededfafd0560da143c0b9 (diff)
downloaduClibc-alpine-bd26ecdcebac54521f8e0e9fd0074db25d97ccfd.tar.bz2
uClibc-alpine-bd26ecdcebac54521f8e0e9fd0074db25d97ccfd.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/unistd/getopt-susv3.c')
-rw-r--r--libc/unistd/getopt-susv3.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/unistd/getopt-susv3.c b/libc/unistd/getopt-susv3.c
index d9ee18c43..70a616011 100644
--- a/libc/unistd/getopt-susv3.c
+++ b/libc/unistd/getopt-susv3.c
@@ -30,10 +30,14 @@
* Initial version of a SUSv3 compliant getopt().
*/
-#define _GNU_SOURCE
#include <unistd.h>
#include <string.h>
#include <stdio.h>
+#include <getopt.h>
+
+libc_hidden_proto(fprintf)
+libc_hidden_proto(strchr)
+libc_hidden_proto(stderr)
#ifdef __UCLIBC_MJN3_ONLY__
#warning TODO: Enable gettext awareness.
@@ -87,7 +91,7 @@ int getopt(int argc, char * const argv[], const char *optstring)
#endif
retval = (unsigned char) *o; /* Avoid problems for char val of -1. */
- if ((*o == ':') || !(s = __strchr(optstring, *o))) { /* Illegal option? */
+ if ((*o == ':') || !(s = strchr(optstring, *o))) { /* Illegal option? */
s = illegal;
retval = '?';
goto BAD;