From 7fdca78a993ef53f6c26bb19a70862557dc794e8 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 2 Feb 2010 10:38:42 +0100 Subject: lxdialog: remove objectfiles on clean Signed-off-by: Bernhard Reutner-Fischer --- extra/config/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/config/Makefile b/extra/config/Makefile index 04175e541..ce406adc2 100644 --- a/extra/config/Makefile +++ b/extra/config/Makefile @@ -74,7 +74,7 @@ $(obj)/%:: $(top_srcdir)$(src)/%_shipped $(Q)cat $< > $@ endif menuconfig_clean: - $(do_rm) $(clean-files) conf $(wildcard *.o) + $(do_rm) $(clean-files) $(lxdialog) conf $(wildcard *.o) distclean: clean $(do_rm) $(lxdialog) $(conf-objs) $(mconf-objs) \ $(kxgettext-objs) \ -- cgit v1.2.3 From 779c35b7c4e47d9fc8f69ee582e822a2f6f45411 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 2 Feb 2010 23:07:24 +0100 Subject: time,times: stop interpreting negative return values ar errors Signed-off-by: Denys Vlasenko --- libc/sysdeps/linux/common/bits/syscalls-common.h | 17 +++++++++++++++++ libc/sysdeps/linux/common/time.c | 13 ++++++------- libc/sysdeps/linux/common/times.c | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/libc/sysdeps/linux/common/bits/syscalls-common.h b/libc/sysdeps/linux/common/bits/syscalls-common.h index 78bbf6c22..5e4e350c5 100644 --- a/libc/sysdeps/linux/common/bits/syscalls-common.h +++ b/libc/sysdeps/linux/common/bits/syscalls-common.h @@ -33,6 +33,9 @@ #ifndef INLINE_SYSCALL # define INLINE_SYSCALL(name, nr, args...) INLINE_SYSCALL_NCS(__NR_##name, nr, args) #endif +#ifndef INLINE_SYSCALL_NOERR +# define INLINE_SYSCALL_NOERR(name, nr, args...) INLINE_SYSCALL_NOERR_NCS(__NR_##name, nr, args) +#endif /* Just like INLINE_SYSCALL(), but take a non-constant syscall (NCS) argument */ #ifndef INLINE_SYSCALL_NCS @@ -47,6 +50,14 @@ __res; \ }) #endif +#ifndef INLINE_SYSCALL_NOERR_NCS +# define INLINE_SYSCALL_NOERR_NCS(name, nr, args...) \ +({ \ + INTERNAL_SYSCALL_DECL(__err); \ + long __res = INTERNAL_SYSCALL_NCS(name, __err, nr, args); \ + __res; \ +}) +#endif /* No point in forcing people to implement both when they only need one */ #ifndef INTERNAL_SYSCALL @@ -80,8 +91,14 @@ type name(C_DECL_ARGS_##nargs(args)) { \ return (type)INLINE_SYSCALL(name, nargs, C_ARGS_##nargs(args)); \ } +#define SYSCALL_NOERR_FUNC(nargs, type, name, args...) \ +type name(C_DECL_ARGS_##nargs(args)) { \ + return (type)INLINE_SYSCALL_NOERR(name, nargs, C_ARGS_##nargs(args)); \ +} + #define _syscall0(args...) SYSCALL_FUNC(0, args) #define _syscall1(args...) SYSCALL_FUNC(1, args) +#define _syscall_noerr1(args...) SYSCALL_NOERR_FUNC(1, args) #define _syscall2(args...) SYSCALL_FUNC(2, args) #define _syscall3(args...) SYSCALL_FUNC(3, args) #define _syscall4(args...) SYSCALL_FUNC(4, args) diff --git a/libc/sysdeps/linux/common/time.c b/libc/sysdeps/linux/common/time.c index 0d9e412bf..e13b44f4d 100644 --- a/libc/sysdeps/linux/common/time.c +++ b/libc/sysdeps/linux/common/time.c @@ -13,19 +13,18 @@ #ifdef __NR_time -_syscall1(time_t, time, time_t *, t) +_syscall_noerr1(time_t, time, time_t *, t) #else - time_t time(time_t * t) { time_t result; struct timeval tv; - if (gettimeofday(&tv, (struct timezone *) NULL)) { - result = (time_t) - 1; - } else { - result = (time_t) tv.tv_sec; - } + /* In Linux, gettimeofday fails only on bad parameter. + * We know that here parameter isn't bad. + */ + gettimeofday(&tv, NULL); + result = (time_t) tv.tv_sec; if (t != NULL) { *t = result; } diff --git a/libc/sysdeps/linux/common/times.c b/libc/sysdeps/linux/common/times.c index e71d1bd71..37ae040d4 100644 --- a/libc/sysdeps/linux/common/times.c +++ b/libc/sysdeps/linux/common/times.c @@ -11,5 +11,5 @@ #include -_syscall1(clock_t, times, struct tms *, buf) +_syscall_noerr1(clock_t, times, struct tms *, buf) libc_hidden_def(times) -- cgit v1.2.3 From 1043d24e77f82d729996fe8192b078e567b16113 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 2 Feb 2010 23:09:16 +0100 Subject: remove two checks for gettimeofday error Signed-off-by: Denys Vlasenko --- libc/misc/time/ftime.c | 6 ++++-- libc/sysdeps/linux/common/clock_gettime.c | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libc/misc/time/ftime.c b/libc/misc/time/ftime.c index b2273860c..ff78d418a 100644 --- a/libc/misc/time/ftime.c +++ b/libc/misc/time/ftime.c @@ -25,8 +25,10 @@ int ftime(struct timeb *timebuf) struct timeval tv; struct timezone tz; - if (gettimeofday (&tv, &tz) < 0) - return -1; + /* In Linux, gettimeofday fails only on bad parameter. + * We know that here parameters aren't bad. + */ + gettimeofday (&tv, &tz); timebuf->time = tv.tv_sec; timebuf->millitm = (tv.tv_usec + 999) / 1000; diff --git a/libc/sysdeps/linux/common/clock_gettime.c b/libc/sysdeps/linux/common/clock_gettime.c index 888cd64b0..d3755a7a8 100644 --- a/libc/sysdeps/linux/common/clock_gettime.c +++ b/libc/sysdeps/linux/common/clock_gettime.c @@ -23,10 +23,12 @@ int clock_gettime(clockid_t clock_id, struct timespec* tp) switch (clock_id) { case CLOCK_REALTIME: - retval = gettimeofday(&tv, NULL); - if (retval == 0) { - TIMEVAL_TO_TIMESPEC(&tv, tp); - } + /* In Linux, gettimeofday fails only on bad parameter. + * We know that here parameter isn't bad. + */ + gettimeofday(&tv, NULL); + TIMEVAL_TO_TIMESPEC(&tv, tp); + retval = 0; break; default: -- cgit v1.2.3 From cca45baf8353d1e338d232f5bdb2d1d6b357f1da Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 3 Feb 2010 00:11:34 +0100 Subject: /etc/resolv.conf: support "timeout:n" and "attempts:n" options text data bss dec hex filename - 1745 2 4 1751 6d7 libc/inet/dnslookup.o + 1760 2 4 1766 6e6 libc/inet/dnslookup.o - 962 0 4 966 3c6 libc/inet/opennameservers.o + 1099 0 4 1103 44f libc/inet/opennameservers.o - 462 4 472 938 3aa libc/inet/res_init.o + 454 4 468 926 39e libc/inet/res_init.o - 870 0 0 870 366 libc/inet/res_query.o + 867 0 0 867 363 libc/inet/res_query.o Signed-off-by: Denys Vlasenko --- include/resolv.h | 14 ++++++-------- libc/inet/resolv.c | 54 +++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/include/resolv.h b/include/resolv.h index e0cd35db1..6f69806c4 100644 --- a/include/resolv.h +++ b/include/resolv.h @@ -114,22 +114,20 @@ typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns, * I guess it's safe to set that to N. */ struct __res_state { -#ifdef __UCLIBC_HAS_COMPAT_RES_STATE__ - int retrans; /* retransmission time interval */ - int retry; /* number of times to retransmit */ -#endif + /*int retrans, retry; - moved, was here */ u_int32_t options; /* (was: ulong) option flags - see below. */ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ #define nsaddr nsaddr_list[0] /* for backward compatibility */ char *dnsrch[MAXDNSRCH + 1]; /* components of domain to search */ + /*char defdname[256]; - moved, was here */ + u_int8_t nscount; /* (was: int) number of name servers */ + u_int8_t ndots; /* (was: unsigned:4) threshold for initial abs. query */ + u_int8_t retrans; /* (was: int) retransmission time interval */ + u_int8_t retry; /* (was: int) number of times to retransmit */ #ifdef __UCLIBC_HAS_COMPAT_RES_STATE__ /* googling for "_res.defdname" says it's still sometimes used. * Pity. It's huge, I want to move it to EXTRA_COMPAT... */ char defdname[256]; /* default domain (deprecated) */ -#endif - u_int8_t nscount; /* (was: int) number of name servers */ - u_int8_t ndots; /* (was: unsigned:4) threshold for initial abs. query */ -#ifdef __UCLIBC_HAS_COMPAT_RES_STATE__ u_int8_t nsort; /* (was: unsigned:4) number of elements in sort_list[] */ u_int16_t pfcode; /* (was: ulong) RES_PRF_ flags. Used by dig. */ unsigned short id; /* current message id */ diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index ee1323e76..0a6fd7aaf 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -407,6 +407,8 @@ __UCLIBC_MUTEX_EXTERN(__resolv_lock); /* Protected by __resolv_lock */ extern void (*__res_sync)(void) attribute_hidden; /*extern uint32_t __resolv_opts attribute_hidden; */ +extern uint8_t __resolv_timeout attribute_hidden; +extern uint8_t __resolv_attempts attribute_hidden; extern unsigned __nameservers attribute_hidden; extern unsigned __searchdomains attribute_hidden; extern sockaddr46_t *__nameserver attribute_hidden; @@ -499,7 +501,7 @@ extern void __close_nameservers(void) attribute_hidden; * Allows addresses returned by gethostbyname to be sorted. * Not supported. * options option[ option]... - * (so far we support none) + * (so far we support timeout:n and attempts:n) * $RES_OPTIONS (space-separated list) is to be added to "options" * debug sets RES_DEBUG in _res.options * ndots:n how many dots there should be so that name will be tried @@ -526,7 +528,7 @@ extern void __close_nameservers(void) attribute_hidden; * * We will read and analyze /etc/resolv.conf as needed before * we do a DNS request. This happens in __dns_lookup. - * (TODO: also re-parse it after a timeout, to catch updates). + * It is reread if its mtime is changed. * * BSD has res_init routine which is used to initialize resolver state * which is held in global structure _res. @@ -903,6 +905,8 @@ __UCLIBC_MUTEX_INIT(__resolv_lock, PTHREAD_MUTEX_INITIALIZER); /* Protected by __resolv_lock */ void (*__res_sync)(void); /*uint32_t __resolv_opts; */ +uint8_t __resolv_timeout; +uint8_t __resolv_attempts; unsigned __nameservers; unsigned __searchdomains; sockaddr46_t *__nameserver; @@ -970,6 +974,9 @@ void attribute_hidden __open_nameservers(void) if (__nameservers) goto sync; + __resolv_timeout = RES_TIMEOUT; + __resolv_attempts = RES_DFLRETRY; + fp = fopen("/etc/resolv.conf", "r"); #ifdef FALLBACK_TO_CONFIG_RESOLVCONF if (!fp) { @@ -1048,7 +1055,24 @@ void attribute_hidden __open_nameservers(void) continue; } /* if (strcmp(keyword, "sortlist") == 0)... */ - /* if (strcmp(keyword, "options") == 0)... */ + if (strcmp(keyword, "options") == 0) { + char *p1; + uint8_t *what; + + if (p == NULL || (p1 = strchr(p, ':')) == NULL) + continue; + *p1++ = '\0'; + if (p1 == NULL) + continue; + if (strcmp(p, "timeout") == 0) + what = &__resolv_timeout; + else if (strcmp(p, "attempts") == 0) + what = &__resolv_attempts; + else + continue; + *what = atoi(p1); + DPRINTF("option %s:%d\n", p, *what); + } } fclose(fp); } @@ -1285,8 +1309,7 @@ int attribute_hidden __dns_lookup(const char *name, local_ns_num = 0; if (_res.options & RES_ROTATE) */ local_ns_num = last_ns_num; -/*TODO: use _res.retry */ - retries_left = __nameservers * RES_DFLRETRY; + retries_left = __nameservers * __resolv_attempts; } retries_left--; if (local_ns_num >= __nameservers) @@ -1345,8 +1368,7 @@ int attribute_hidden __dns_lookup(const char *name, send(fd, packet, packet_len, 0); #ifdef USE_SELECT -/*TODO: use _res.retrans*/ - reply_timeout = RES_TIMEOUT; + reply_timeout = __resolv_timeout; wait_again: FD_ZERO(&fds); FD_SET(fd, &fds); @@ -1360,7 +1382,7 @@ int attribute_hidden __dns_lookup(const char *name, } reply_timeout--; #else - reply_timeout = RES_TIMEOUT * 1000; + reply_timeout = __resolv_timeout * 1000; wait_again: fds.fd = fd; fds.events = POLLIN; @@ -2878,6 +2900,8 @@ static void res_sync_func(void) __nameserver[n].sa4 = rp->nsaddr_list[n]; /* struct copy */ #endif } + __resolv_timeout = rp->retrans; + __resolv_attempts = rp->retry; /* Extend and comment what program is known * to use which _res.XXX member(s). @@ -2904,13 +2928,17 @@ int res_init(void) memset(rp, 0, sizeof(*rp)); rp->options = RES_INIT; -#ifdef __UCLIBC_HAS_COMPAT_RES_STATE__ rp->retrans = RES_TIMEOUT; - rp->retry = 4; -/*TODO: pulls in largish static buffers... use simpler one? */ - rp->id = random(); -#endif + rp->retry = RES_DFLRETRY; rp->ndots = 1; +#ifdef __UCLIBC_HAS_COMPAT_RES_STATE__ + /* Was: "rp->id = random();" but: + * - random() pulls in largish static buffers + * - isn't actually random unless, say, srandom(time(NULL)) was called + * - is not used by uclibc anyway :) + */ + /* rp->id = 0; - memset did it */ +#endif #ifdef __UCLIBC_HAS_EXTRA_COMPAT_RES_STATE__ rp->_vcsock = -1; #endif -- cgit v1.2.3 From 80361b7c7421f4d7742e3a27b006ab9fe4420a32 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 3 Feb 2010 11:44:11 +0100 Subject: powerpc/bits/sysdep.h: move confusingly placed #undef Signed-off-by: Denys Vlasenko --- libc/sysdeps/linux/powerpc/bits/sysdep.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libc/sysdeps/linux/powerpc/bits/sysdep.h b/libc/sysdeps/linux/powerpc/bits/sysdep.h index c42efbabd..478ebdd7a 100644 --- a/libc/sysdeps/linux/powerpc/bits/sysdep.h +++ b/libc/sysdeps/linux/powerpc/bits/sysdep.h @@ -182,7 +182,6 @@ # undef INTERNAL_SYSCALL_DECL # define INTERNAL_SYSCALL_DECL(err) long int err -# undef INTERNAL_SYSCALL # define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ ({ \ register long int r0 __asm__ ("r0"); \ @@ -196,7 +195,7 @@ register long int r10 __asm__ ("r10"); \ register long int r11 __asm__ ("r11"); \ register long int r12 __asm__ ("r12"); \ - LOADARGS_##nr(name, args); \ + LOADARGS_##nr(name, args); \ __asm__ __volatile__ \ ("sc \n\t" \ "mfcr %0" \ @@ -208,6 +207,7 @@ err = r0; \ (int) r3; \ }) +# undef INTERNAL_SYSCALL # define INTERNAL_SYSCALL(name, err, nr, args...) \ INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) @@ -218,11 +218,11 @@ # undef INTERNAL_SYSCALL_ERRNO # define INTERNAL_SYSCALL_ERRNO(val, err) (val) -# define LOADARGS_0(name, dummy) \ +# define LOADARGS_0(name, dummy) \ r0 = name # define LOADARGS_1(name, __arg1) \ - long int arg1 = (long int) (__arg1); \ - LOADARGS_0(name, 0); \ + long int arg1 = (long int) (__arg1); \ + LOADARGS_0(name, 0); \ extern void __illegally_sized_syscall_arg1 (void); \ if (__builtin_classify_type (__arg1) != 5 && sizeof (__arg1) > 4) \ __illegally_sized_syscall_arg1 (); \ -- cgit v1.2.3 From 23e2b7118e41ba78b4069510daae772540b49ebb Mon Sep 17 00:00:00 2001 From: Filippo Arcidiacono Date: Wed, 3 Feb 2010 07:14:18 -0500 Subject: libc: Fix l64a to return the correct buffer pointer l64a was returning the pointer to the end of the internal buffer instead of the start. This caused an infinite loop in passwd application. Signed-off-by: Filippo Arcidiacono Signed-off-by: Carmelo Amoroso --- libc/stdlib/l64a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/stdlib/l64a.c b/libc/stdlib/l64a.c index 5a1dc13a6..1f0dfb7ac 100644 --- a/libc/stdlib/l64a.c +++ b/libc/stdlib/l64a.c @@ -52,5 +52,5 @@ char * l64a (long int n) } *p = '\0'; - return p; + return result; } -- cgit v1.2.3 From f588c2d4bb2d9cb5f2ae5f4f50a7eaf60f80aff6 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 3 Feb 2010 15:56:24 +0100 Subject: add gethostid() testcase Signed-off-by: Bernhard Reutner-Fischer --- test/inet/gethostid.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/inet/gethostid.c diff --git a/test/inet/gethostid.c b/test/inet/gethostid.c new file mode 100644 index 000000000..295166536 --- /dev/null +++ b/test/inet/gethostid.c @@ -0,0 +1,6 @@ +#include +#include +int main(void) { + printf("hostid=%d\n", gethostid()); + return 0; +} -- cgit v1.2.3 From 8a227f31655d4cf1e06ceb62d6805a88516d69d4 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 3 Feb 2010 20:15:24 +0100 Subject: __uClibc_main: use __pagesize to protect against recursion Signed-off-by: Bernhard Reutner-Fischer --- libc/misc/internals/__uClibc_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libc/misc/internals/__uClibc_main.c b/libc/misc/internals/__uClibc_main.c index 19acbe0d6..6e520fabb 100644 --- a/libc/misc/internals/__uClibc_main.c +++ b/libc/misc/internals/__uClibc_main.c @@ -168,11 +168,9 @@ extern void __uClibc_init(void); libc_hidden_proto(__uClibc_init) void __uClibc_init(void) { - static smallint been_there_done_that; - - if (been_there_done_that) + /* Don't recurse */ + if (__pagesize) return; - been_there_done_that++; /* Setup an initial value. This may not be perfect, but is * better than malloc using __pagesize=0 for atexit, ctors, etc. */ -- cgit v1.2.3 From 5d5b6fe5f898ce6ef260b1648aaaf7f12a8c7988 Mon Sep 17 00:00:00 2001 From: Austin Foxley Date: Wed, 3 Feb 2010 12:12:10 -0800 Subject: Unbreak build for sparc on some config's Thanks to rob@landley.net Signed-off-by: Austin Foxley --- libc/sysdeps/linux/sparc/sigaction.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libc/sysdeps/linux/sparc/sigaction.c b/libc/sysdeps/linux/sparc/sigaction.c index a22ac40af..7140fd3a4 100644 --- a/libc/sysdeps/linux/sparc/sigaction.c +++ b/libc/sysdeps/linux/sparc/sigaction.c @@ -34,7 +34,8 @@ _syscall5(int, rt_sigaction, int, a, int, b, int, c, int, d, int, e); static void __rt_sigreturn_stub(void); static void __sigreturn_stub(void); -int __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oact) +libc_hidden_proto(sigaction) +int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { int ret; struct sigaction kact, koact; @@ -65,10 +66,8 @@ int __libc_sigaction(int sig, const struct sigaction *act, struct sigaction *oac return ret; } -#ifndef LIBC_SIGACTION -weak_alias(__libc_sigaction,sigaction) -libc_hidden_weak(sigaction) -#endif +libc_hidden_def(sigaction) +weak_alias(sigaction,__libc_sigaction) static void __rt_sigreturn_stub(void) -- cgit v1.2.3 From 306a7db8263c217b0e017f84241832f531449849 Mon Sep 17 00:00:00 2001 From: Aurelien Jacobs Date: Thu, 4 Feb 2010 09:26:08 -0800 Subject: libm: enable log2f and exp2f Signed-off-by: Aurelien Jacobs Signed-off-by: Austin Foxley --- libm/Makefile.in | 4 +++- libm/float_wrappers.c | 4 ++-- test/math/compile_test.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/libm/Makefile.in b/libm/Makefile.in index 56b2d76c3..6eb935851 100644 --- a/libm/Makefile.in +++ b/libm/Makefile.in @@ -75,7 +75,7 @@ libm_CSRC := \ s_remquo.c w_exp2.c # Not implemented [yet?], see comment in float_wrappers.c: -# exp2f.o fdimf.o fmaf.o fmaxf.o fminf.o log2f.o +# fdimf.o fmaf.o fmaxf.o fminf.o # nearbyintf.o remquof.o scalblnf.o tgammaf.o FL_MOBJ := \ acosf.o \ @@ -93,6 +93,7 @@ FL_MOBJ := \ coshf.o \ erfcf.o \ erff.o \ + exp2f.o \ expf.o \ expm1f.o \ fabsf.o \ @@ -108,6 +109,7 @@ FL_MOBJ := \ llroundf.o \ log10f.o \ log1pf.o \ + log2f.o \ logbf.o \ logf.o \ lrintf.o \ diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c index 93d56c3c9..e1ab8b57c 100644 --- a/libm/float_wrappers.c +++ b/libm/float_wrappers.c @@ -41,12 +41,10 @@ long long func##f (float x) \ /* For the time being, do _NOT_ implement these functions * that are defined by SuSv3 [why?] */ -#undef L_exp2f /*float exp2f(float);*/ #undef L_fdimf /*float fdimf(float, float);*/ #undef L_fmaf /*float fmaf(float, float, float);*/ #undef L_fmaxf /*float fmaxf(float, float);*/ #undef L_fminf /*float fminf(float, float);*/ -#undef L_log2f /*float log2f(float);*/ #undef L_nearbyintf /*float nearbyintf(float);*/ #undef L_nexttowardf /*float nexttowardf(float, long double);*/ #undef L_remquof /*float remquof(float, float, int *);*/ @@ -70,6 +68,7 @@ float cosf(float); float coshf(float); float erfcf(float); float erff(float); +float exp2f(float); float expf(float); float expm1f(float); float fabsf(float); @@ -83,6 +82,7 @@ float lgammaf(float); long long llroundf(float); float log10f(float); float log1pf(float); +float log2f(float); float logbf(float); float logf(float); long lroundf(float); diff --git a/test/math/compile_test.c b/test/math/compile_test.c index 61488857a..ab8c40c48 100644 --- a/test/math/compile_test.c +++ b/test/math/compile_test.c @@ -18,7 +18,7 @@ r += cosf(float_x); r += coshf(float_x); r += erfcf(float_x); r += erff(float_x); -/*r += exp2f(float_x); - uclibc does not have it (yet?) */ +r += exp2f(float_x); r += expf(float_x); r += expm1f(float_x); r += fabsf(float_x); @@ -38,7 +38,7 @@ r += llrintf(float_x); r += llroundf(float_x); r += log10f(float_x); r += log1pf(float_x); -/*r += log2f(float_x); - uclibc does not have it (yet?) */ +r += log2f(float_x); r += logbf(float_x); r += logf(float_x); r += lrintf(float_x); -- cgit v1.2.3 From 80c1f895b8563714977b90324772558ef0772ea5 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Thu, 4 Feb 2010 23:36:29 +0100 Subject: libm: explain why some funcs are not implemented (yet) Signed-off-by: Bernhard Reutner-Fischer --- libm/float_wrappers.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libm/float_wrappers.c b/libm/float_wrappers.c index e1ab8b57c..a13aac93a 100644 --- a/libm/float_wrappers.c +++ b/libm/float_wrappers.c @@ -40,7 +40,8 @@ long long func##f (float x) \ /* For the time being, do _NOT_ implement these functions - * that are defined by SuSv3 [why?] */ + * that are defined by SuSv3 [because we don't need them + * and nobody asked to include them] */ #undef L_fdimf /*float fdimf(float, float);*/ #undef L_fmaf /*float fmaf(float, float, float);*/ #undef L_fmaxf /*float fmaxf(float, float);*/ -- cgit v1.2.3 From ed901783d9a1908d9a43e8f90c3a89700b5a4300 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 5 Feb 2010 11:58:47 +0100 Subject: Revert "ftw.h installation: fix inverted logic" The logic was fine previously. Thanks to Peter Kjellerstedt for pointing out my confusion. This reverts commit d75f980f379dfbbe70ae8fb0956693a95af2fca2. Signed-off-by: Bernhard Reutner-Fischer --- Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 26fbc0fba..9a945be31 100644 --- a/Makefile.in +++ b/Makefile.in @@ -262,7 +262,7 @@ HEADERS_RM-$(UCLIBC_HAS_BSD_ERR) += err.h HEADERS_RM-$(UCLIBC_HAS_CRYPT) += crypt.h HEADERS_RM-$(UCLIBC_HAS_EPOLL) += sys/epoll.h HEADERS_RM-$(UCLIBC_HAS_FENV) += fenv.h bits/fenv.h bits/fenvinline.h -HEADERS_RM-$(if $(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)),,y) += ftw.h +HEADERS_RM-$(findstring y,$(UCLIBC_HAS_FTW)$(UCLIBC_HAS_NFTW)) += ftw.h HEADERS_RM-$(UCLIBC_HAS_GETTEXT_AWARENESS) += libintl.h HEADERS_RM-$(UCLIBC_HAS_GLIBC_CUSTOM_PRINTF) += printf.h HEADERS_RM-$(UCLIBC_HAS_GLOB) += glob.h -- cgit v1.2.3 From 5e0feee937a724654d1ae199ccee7e7b9f98e7e2 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 5 Feb 2010 19:15:46 +0100 Subject: ldso: add missing prototypes Signed-off-by: Bernhard Reutner-Fischer --- ldso/include/ldso.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h index 99dcf839c..e5669057c 100644 --- a/ldso/include/ldso.h +++ b/ldso/include/ldso.h @@ -72,6 +72,11 @@ extern char *_dl_ldsopath; /* Where the shared lib loader was found extern const char *_dl_progname; /* The name of the executable being run */ extern size_t _dl_pagesize; /* Store the page size for use later */ +#ifdef USE_TLS +extern void _dl_add_to_slotinfo (struct link_map *l); +extern void ** __attribute__ ((const)) _dl_initial_error_catch_tsd (void); +#endif + #ifdef __SUPPORT_LD_DEBUG__ extern char *_dl_debug; extern char *_dl_debug_symbols; -- cgit v1.2.3 From df1580676a48dc3a9faf7e508ad3ec822a8e5a05 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 5 Feb 2010 19:19:08 +0100 Subject: prctl: silence shadow warnings Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/prctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/sysdeps/linux/common/prctl.c b/libc/sysdeps/linux/common/prctl.c index a6764c532..39c0d4fb0 100644 --- a/libc/sysdeps/linux/common/prctl.c +++ b/libc/sysdeps/linux/common/prctl.c @@ -13,5 +13,5 @@ #ifdef __NR_prctl extern int prctl (int, long, long, long, long); -_syscall5(int, prctl, int, option, long, arg2, long, arg3, long, arg4, long, arg5) +_syscall5(int, prctl, int, option, long, _a2, long, _a3, long, _a4, long, _a5) #endif -- cgit v1.2.3