diff options
-rw-r--r-- | Makefile.in | 1 | ||||
-rw-r--r-- | extra/Configs/Config.in | 35 | ||||
-rw-r--r-- | include/signal.h | 2 | ||||
-rw-r--r-- | include/stdlib.h | 2 | ||||
-rw-r--r-- | include/tgmath.h | 2 | ||||
-rw-r--r-- | include/unistd.h | 3 | ||||
-rw-r--r-- | include/wchar.h | 2 | ||||
-rw-r--r-- | libc/inet/Makefile.in | 10 | ||||
-rw-r--r-- | libc/misc/ctype/Makefile.in | 8 | ||||
-rw-r--r-- | libc/signal/Makefile.in | 5 | ||||
-rw-r--r-- | libc/signal/signal.c | 13 | ||||
-rw-r--r-- | libc/stdlib/Makefile.in | 4 | ||||
-rw-r--r-- | libc/string/strstr.c | 2 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/mathcalls.h | 3 | ||||
-rw-r--r-- | libc/unistd/Makefile.in | 4 | ||||
-rw-r--r-- | libm/e_scalb.c | 3 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/attr.c | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/sysdeps/pthread/pthread.h | 2 | ||||
-rw-r--r-- | libpthread/linuxthreads/sysdeps/pthread/pthread.h | 2 |
19 files changed, 81 insertions, 24 deletions
diff --git a/Makefile.in b/Makefile.in index 30d7ffc40..ef81ce36b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -310,6 +310,7 @@ endif ifneq ($(UCLIBC_SUSV3_LEGACY),y) # Remove timeb.h since the LEGACY ftime() was disabled upon request $(RM) $(PREFIX)$(DEVEL_PREFIX)include/sys/timeb.h + $(RM) $(PREFIX)$(DEVEL_PREFIX)include/ucontext.h endif ifneq ($(UCLIBC_HAS_EPOLL),y) # Remove epoll.h since epoll_*() were disabled upon request diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in index 126707959..734545eb9 100644 --- a/extra/Configs/Config.in +++ b/extra/Configs/Config.in @@ -532,10 +532,22 @@ config COMPAT_ATEXIT config UCLIBC_SUSV3_LEGACY bool "Enable SuSv3 LEGACY functions" default n + #vfork, + # h_errno + # gethostbyaddr + # gethostbyname help Enable this option if you want to have SuSv3 LEGACY functions in the library, else they are replaced by SuSv3 proposed macros. - Currently applies to bcopy/bzero/bcmp/index/rindex/ftime. + Currently applies to: + + bcmp, bcopy, bzero, index, rindex, ftime, + bsd_signal, (ecvt), (fcvt), gcvt, (getcontext), + (getwd), (makecontext), + mktemp, (pthread_attr_getstackaddr), (pthread_attr_setstackaddr), + scalb, (setcontext), (swapcontext), ualarm, usleep, + wcswcs. + WARNING! ABI incompatibility. config UCLIBC_SUSV3_LEGACY_MACROS @@ -546,6 +558,27 @@ config UCLIBC_SUSV3_LEGACY_MACROS Currently applies to bcopy/bzero/bcmp/index/rindex et al. WARNING! ABI incompatibility. +config UCLIBC_SUSV4_LEGACY + bool "Enable SuSv4 LEGACY or obsolescent functions" + default n + help + Enable this option if you want to have SuSv4 LEGACY functions + and macros in the library. + Currently applies to: + + - XSI functions: + _longjmp, _setjmp, _tolower, _toupper, ftw, getitimer, + gettimeofday, isascii, pthread_getconcurrency, + pthread_setconcurrency, setitimer, setpgrp, sighold, + sigignore, sigpause, sigrelse, sigset, siginterrupt, + tempnam, toascii, ulimit. + + - Base functions: + asctime, asctime_r, ctime, ctime_r, gets, rand_r, + tmpnam, utime. + + WARNING! ABI incompatibility. + config UCLIBC_HAS_STUBS bool "Provide stubs for unavailable functionality" default n diff --git a/include/signal.h b/include/signal.h index b42800f51..d10463068 100644 --- a/include/signal.h +++ b/include/signal.h @@ -128,7 +128,7 @@ extern __sighandler_t __REDIRECT_NTH (signal, #endif __END_NAMESPACE_STD -#ifdef __USE_XOPEN +#if defined __USE_XOPEN && defined __UCLIBC_SUSV3_LEGACY__ /* The X/Open definition of `signal' conflicts with the BSD version. So they defined another function `bsd_signal'. */ extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler) diff --git a/include/stdlib.h b/include/stdlib.h index 87b284639..124dc7329 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -598,11 +598,13 @@ extern int clearenv (void) __THROW; #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED +# if defined __UCLIBC_SUSV3_LEGACY__ /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; they are replaced with a string that makes the file name unique. Returns TEMPLATE, or a null pointer if it cannot get a unique file name. */ extern char *mktemp (char *__template) __THROW __nonnull ((1)) __wur; +# endif /* Generate a unique temporary file name from TEMPLATE. The last six characters of TEMPLATE must be "XXXXXX"; diff --git a/include/tgmath.h b/include/tgmath.h index 685a34588..b3a546d17 100644 --- a/include/tgmath.h +++ b/include/tgmath.h @@ -376,6 +376,7 @@ /* Return the remainder of integer divison X / Y with infinite precision. */ #define remainder(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, remainder) +#if defined __UCLIBC_SUSV3_LEGACY__ /* Return X times (2 to the Nth power). */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED # define scalb(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, scalb) @@ -387,6 +388,7 @@ /* Return X times (2 to the Nth power). */ #define scalbln(Val1, Val2) \ __TGMATH_BINARY_FIRST_REAL_ONLY (Val1, Val2, scalbln) +#endif /* UCLIBC_SUSV3_LEGACY */ /* Return the binary exponent of X, which must be nonzero. */ #define ilogb(Val) __TGMATH_UNARY_REAL_ONLY (Val, ilogb) diff --git a/include/unistd.h b/include/unistd.h index ea229dec0..48757f244 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -410,7 +410,8 @@ libc_hidden_proto(alarm) extern unsigned int sleep (unsigned int __seconds); libc_hidden_proto(sleep) -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if (defined __USE_BSD || defined __USE_XOPEN_EXTENDED) \ + && defined __UCLIBC_SUSV3_LEGACY__ /* Set an alarm to go off (generating a SIGALRM signal) in VALUE microseconds. If INTERVAL is nonzero, when the alarm goes off, the timer is reset to go off every INTERVAL microseconds thereafter. diff --git a/include/wchar.h b/include/wchar.h index 5bf49b662..3795998a5 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -275,7 +275,7 @@ extern size_t wcslen (__const wchar_t *__s) __THROW __attribute_pure__; libc_hidden_proto(wcslen) __END_NAMESPACE_C99 -#ifdef __USE_XOPEN +#if defined __USE_XOPEN && defined __UCLIBC_SUSV3_LEGACY__ /* Another name for `wcsstr' from XPG4. */ extern wchar_t *wcswcs (__const wchar_t *__haystack, __const wchar_t *__needle) __THROW __attribute_pure__; diff --git a/libc/inet/Makefile.in b/libc/inet/Makefile.in index 50ad210d9..8d0484e01 100644 --- a/libc/inet/Makefile.in +++ b/libc/inet/Makefile.in @@ -35,18 +35,16 @@ endif # multi source resolv.c resolv_CSRC += \ encodeh.c decodeh.c encoded.c decoded.c lengthd.c \ - encodeq.c decodeq.c lengthq.c encodea.c decodea.c \ + encodeq.c decodeq.c encodea.c decodea.c lengthq.c \ dnslookup.c opennameservers.c closenameservers.c \ read_etc_hosts_r.c get_hosts_byaddr_r.c get_hosts_byname_r.c \ getnameinfo.c \ gethostbyaddr_r.c gethostbyname_r.c gethostbyname2_r.c gethostent_r.c \ gethostbyaddr.c gethostbyname.c gethostbyname2.c gethostent.c \ res_init.c res_query.c res_comp.c ns_name.c \ - ethers.c _res_state.c -#FIXME! ethers.c is a separate file, not a part of resolv.c - !? + _res_state.c ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),) CSRC += $(resolv_CSRC) - ## # unused ATM ## CSRC += encodep.c decodep.c formquery.c endif @@ -61,6 +59,10 @@ ifeq ($(UCLIBC_HAS_SOCKET),y) CSRC += $(socketcalls_CSRC) opensock.c endif +ifneq ($(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),) +CSRC += ethers.c +endif + INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC)) INET_OBJ := $(patsubst %.c,$(INET_OUT)/%.o,$(CSRC)) 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 85dca1f78..854207829 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 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y) CSRC:=$(filter-out raise.c sigaction.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 c631f2e20..1f0ccdc2b 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 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 diff --git a/libm/e_scalb.c b/libm/e_scalb.c index db3639683..ff0c77523 100644 --- a/libm/e_scalb.c +++ b/libm/e_scalb.c @@ -41,6 +41,7 @@ double attribute_hidden __ieee754_scalb(double x, double fn) #endif } +#if defined __UCLIBC_SUSV3_LEGACY__ /* * wrapper scalb(double x, double fn) is provide for * passing various standard test suite. One @@ -69,3 +70,5 @@ double scalb(double x, double fn) #else strong_alias(__ieee754_scalb, scalb) #endif + +#endif /* UCLIBC_SUSV3_LEGACY */ diff --git a/libpthread/linuxthreads.old/attr.c b/libpthread/linuxthreads.old/attr.c index a0aacf12a..5d68edc36 100644 --- a/libpthread/linuxthreads.old/attr.c +++ b/libpthread/linuxthreads.old/attr.c @@ -209,6 +209,7 @@ int __pthread_attr_setstackaddr(pthread_attr_t *attr, void *stackaddr) } weak_alias (__pthread_attr_setstackaddr, pthread_attr_setstackaddr) +#if 0 /* uClibc: deprecated stuff disabled */ int __pthread_attr_getstackaddr(const pthread_attr_t *attr, void **stackaddr) { /* XXX This function has a stupid definition. The standard specifies @@ -229,6 +230,7 @@ int __pthread_attr_setstacksize(pthread_attr_t *attr, size_t stacksize) return 0; } weak_alias (__pthread_attr_setstacksize, pthread_attr_setstacksize) +#endif int __pthread_attr_getstacksize(const pthread_attr_t *attr, size_t *stacksize) { diff --git a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h index 870e37fa5..f8ab69721 100644 --- a/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads.old/sysdeps/pthread/pthread.h @@ -252,6 +252,7 @@ extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict __THROW; #endif +#if 0 /* uClibc: deprecated stuff disabled. def __UCLIBC_SUSV3_LEGACY__ */ /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The @@ -263,6 +264,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW; +#endif #ifdef __USE_XOPEN2K /* The following two interfaces are intended to replace the last two. They diff --git a/libpthread/linuxthreads/sysdeps/pthread/pthread.h b/libpthread/linuxthreads/sysdeps/pthread/pthread.h index 0fa3be131..0b777be19 100644 --- a/libpthread/linuxthreads/sysdeps/pthread/pthread.h +++ b/libpthread/linuxthreads/sysdeps/pthread/pthread.h @@ -252,6 +252,7 @@ extern int pthread_attr_getguardsize (__const pthread_attr_t *__restrict __THROW; #endif +#if 0 /* uClibc: deprecated stuff disabled. def __UCLIBC_SUSV3_LEGACY__ */ /* Set the starting address of the stack of the thread to be created. Depending on whether the stack grows up or down the value must either be higher or lower than all the address in the memory block. The @@ -263,6 +264,7 @@ extern int pthread_attr_setstackaddr (pthread_attr_t *__attr, extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict __attr, void **__restrict __stackaddr) __THROW; +#endif #ifdef __USE_XOPEN2K /* The following two interfaces are intended to replace the last two. They |