summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-27 23:12:57 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-02-27 23:12:57 +0000
commitd032c07a7913c9aa932e35eb04a3cccdae8a9a1d (patch)
tree602adadabd571e89b1288643647510533baef791 /libc
parent589a76ea96e1153a3d4c30a09ecb6b54546d3bf8 (diff)
downloaduClibc-alpine-d032c07a7913c9aa932e35eb04a3cccdae8a9a1d.tar.bz2
uClibc-alpine-d032c07a7913c9aa932e35eb04a3cccdae8a9a1d.tar.xz
Merge from trunk.
Diffstat (limited to 'libc')
-rw-r--r--libc/unistd/Makefile.in11
-rw-r--r--libc/unistd/getopt-susv3.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in
index 4a0bb0734..6e85e10c9 100644
--- a/libc/unistd/Makefile.in
+++ b/libc/unistd/Makefile.in
@@ -19,9 +19,18 @@ CSRC := $(filter-out daemon.c,$(CSRC))
endif
ifeq ($(UCLIBC_HAS_GNU_GETOPT),y)
-CSRC := $(filter-out getopt-susv3.c,$(CSRC))
+CSRC := $(filter-out getopt-susv3.c getopt_long-susv3.c,$(CSRC))
else
CSRC := $(filter-out getopt.c,$(CSRC))
+ifneq ($(UCLIBC_HAS_GETOPT_LONG),y)
+CSRC := $(filter-out getopt_long-susv3.c,$(CSRC))
+endif
+endif
+
+ifeq ($(UCLIBC_HAS_GNU_GETSUBOPT),y)
+CSRC := $(filter-out getsubopt-susv3.c,$(CSRC))
+else
+CSRC := $(filter-out getsubopt.c,$(CSRC))
endif
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
diff --git a/libc/unistd/getopt-susv3.c b/libc/unistd/getopt-susv3.c
index 70a616011..df36bfbb8 100644
--- a/libc/unistd/getopt-susv3.c
+++ b/libc/unistd/getopt-susv3.c
@@ -59,6 +59,7 @@ int optind = 1;
int optopt = 0;
char *optarg = NULL;
+libc_hidden_proto(getopt)
int getopt(int argc, char * const argv[], const char *optstring)
{
static const char *o; /* multi opt position */
@@ -135,3 +136,4 @@ int getopt(int argc, char * const argv[], const char *optstring)
DONE:
return retval;
}
+libc_hidden_def(getopt)