From d032c07a7913c9aa932e35eb04a3cccdae8a9a1d Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Mon, 27 Feb 2006 23:12:57 +0000 Subject: Merge from trunk. --- libc/unistd/Makefile.in | 11 ++++++++++- libc/unistd/getopt-susv3.c | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'libc') 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) -- cgit v1.2.3