summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-12-29 13:55:44 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-12-29 13:55:44 +0000
commit3a40407c06a470f5b15a4df310ab135233ac6109 (patch)
tree5835d1a4d987f81411c4fe9cf3153467aea597f5 /libc
parent30f06faa24eb3d6da34c80f5632a7f01aee900e0 (diff)
- expand SUSv3_LEGACY
- SUSv4_LEGACY part #1 (non-networking)
Diffstat (limited to 'libc')
-rw-r--r--libc/misc/ctype/Makefile.in8
-rw-r--r--libc/signal/Makefile.in5
-rw-r--r--libc/signal/signal.c13
-rw-r--r--libc/stdlib/Makefile.in4
-rw-r--r--libc/string/strstr.c2
-rw-r--r--libc/sysdeps/linux/common/bits/mathcalls.h3
-rw-r--r--libc/unistd/Makefile.in4
7 files changed, 23 insertions, 16 deletions
diff --git a/libc/misc/ctype/Makefile.in b/libc/misc/ctype/Makefile.in
index 29b63f3d1..3f307f093 100644
--- a/libc/misc/ctype/Makefile.in
+++ b/libc/misc/ctype/Makefile.in
@@ -7,11 +7,13 @@
# multi source ctype.c
COM_SRC := \
- isalnum.c isalpha.c isascii.c iscntrl.c isdigit.c \
+ isalnum.c isalpha.c iscntrl.c isdigit.c \
isgraph.c islower.c isprint.c ispunct.c isspace.c \
- isupper.c isxdigit.c toascii.c tolower.c toupper.c \
+ isupper.c isxdigit.c tolower.c toupper.c \
isblank.c
-
+ifeq ($(UCLIBC_SUSV4_LEGACY),y)
+COM_SRC += isascii.c toascii.c
+endif
CSRC := $(COM_SRC)
ifeq ($(UCLIBC_HAS_CTYPE_TABLES),y)
diff --git a/libc/signal/Makefile.in b/libc/signal/Makefile.in
index e930d7ef6..8e904535a 100644
--- a/libc/signal/Makefile.in
+++ b/libc/signal/Makefile.in
@@ -7,7 +7,7 @@
CSRC := allocrtsig.c killpg.c raise.c sigaction.c sigaddset.c sigandset.c \
sigblock.c sigdelset.c sigempty.c sigfillset.c siggetmask.c \
- sigintr.c sigisempty.c sigismem.c sigjmp.c signal.c \
+ sigisempty.c sigismem.c sigjmp.c signal.c \
sigorset.c sigpause.c sigsetmask.c sigsetops.c sigwait.c
ifeq ($(UCLIBC_HAS_OBSOLETE_BSD_SIGNAL),y)
CSRC += sighold.c sigignore.c sigrelse.c sigset.c
@@ -15,6 +15,9 @@ endif
ifeq ($(UCLIBC_HAS_OBSOLETE_SYSV_SIGNAL),y)
CSRC += sysv_signal.c
endif
+ifeq ($(UCLIBC_SUSV4_LEGACY),y)
+CSRC += sigintr.c
+endif
ifneq ($(strip $(ARCH_OBJS)),)
CSRC := $(filter-out $(notdir $(ARCH_OBJS:.o=.c)),$(CSRC))
diff --git a/libc/signal/signal.c b/libc/signal/signal.c
index f3dfa33fc..644617c15 100644
--- a/libc/signal/signal.c
+++ b/libc/signal/signal.c
@@ -22,15 +22,12 @@
#include <signal.h>
#include <string.h> /* For the real memset prototype. */
-/* libc_hidden_proto(sigaction) */
-
sigset_t _sigintr attribute_hidden; /* Set by siginterrupt. */
/* Set the handler for the signal SIG to HANDLER,
returning the old handler, or SIG_ERR on error. */
-extern __typeof(bsd_signal) __bsd_signal;
-attribute_hidden __sighandler_t
-__bsd_signal (int sig, __sighandler_t handler)
+__sighandler_t
+signal (int sig, __sighandler_t handler)
{
struct sigaction act, oact;
@@ -51,7 +48,7 @@ __bsd_signal (int sig, __sighandler_t handler)
return oact.sa_handler;
}
-strong_alias(__bsd_signal,bsd_signal)
-/* libc_hidden_proto(signal) */
-strong_alias(__bsd_signal,signal)
libc_hidden_def(signal)
+#ifdef __UCLIBC_SUSV3_LEGACY__
+strong_alias(signal,bsd_signal)
+#endif
diff --git a/libc/stdlib/Makefile.in b/libc/stdlib/Makefile.in
index 75c613c79..d12156876 100644
--- a/libc/stdlib/Makefile.in
+++ b/libc/stdlib/Makefile.in
@@ -10,7 +10,7 @@ include $(top_srcdir)libc/stdlib/malloc-simple/Makefile.in
include $(top_srcdir)libc/stdlib/malloc-standard/Makefile.in
CSRC := \
- abort.c getenv.c mkdtemp.c mktemp.c realpath.c mkstemp.c \
+ abort.c getenv.c mkdtemp.c realpath.c mkstemp.c \
rand.c random.c random_r.c setenv.c system.c div.c ldiv.c lldiv.c \
getpt.c drand48-iter.c jrand48.c \
jrand48_r.c lrand48.c lrand48_r.c mrand48.c mrand48_r.c nrand48.c \
@@ -31,7 +31,7 @@ endif
ifeq ($(UCLIBC_HAS_FLOATS),y)
CSRC += drand48.c drand48_r.c erand48.c erand48_r.c
ifeq ($(UCLIBC_SUSV3_LEGACY),y)
-CSRC += gcvt.c
+CSRC += gcvt.c mktemp.c
endif
endif
diff --git a/libc/string/strstr.c b/libc/string/strstr.c
index 05712e62b..11417fb78 100644
--- a/libc/string/strstr.c
+++ b/libc/string/strstr.c
@@ -39,6 +39,6 @@ Wchar *Wstrstr(const Wchar *s1, const Wchar *s2)
}
#ifndef WANT_WIDE
libc_hidden_def(strstr)
-#else
+#elif defined __UCLIBC_SUSV3_LEGACY__
strong_alias(wcsstr,wcswcs)
#endif
diff --git a/libc/sysdeps/linux/common/bits/mathcalls.h b/libc/sysdeps/linux/common/bits/mathcalls.h
index 9241dd26d..1f2894fa5 100644
--- a/libc/sysdeps/linux/common/bits/mathcalls.h
+++ b/libc/sysdeps/linux/common/bits/mathcalls.h
@@ -358,7 +358,8 @@ __MATHCALLI (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
__END_NAMESPACE_C99
#endif
-#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+#if (defined __USE_MISC || defined __USE_XOPEN_EXTENDED) \
+ && defined __UCLIBC_SUSV3_LEGACY__
/* Return X times (2 to the Nth power). */
__MATHCALL (scalb,, (_Mdouble_ __x, _Mdouble_ __n));
#endif
diff --git a/libc/unistd/Makefile.in b/libc/unistd/Makefile.in
index b447a85e1..f6ef98cf0 100644
--- a/libc/unistd/Makefile.in
+++ b/libc/unistd/Makefile.in
@@ -33,6 +33,10 @@ else
CSRC := $(filter-out getsubopt.c,$(CSRC))
endif
+ifneq ($(UCLIBC_SUSV3_LEGACY),y)
+CSRC := $(filter-out ualarm.c usleep.c,$(CSRC))
+endif
+
ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
CSRC := $(filter-out sleep.c,$(CSRC))
endif