[PATCH 2/2] libdl: fix pointer-width problems with _dl_tls_symaddr() calls.

2011-11-01 Thread William Pitcock
Casting a pointer to Elf32_Addr type will discard 32 bits from the pointer address. Using unsigned long ensures that a pointer is 64-bit safe. Signed-off-by: William Pitcock --- ldso/libdl/libdl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ldso/libdl/libdl.c b/lds

[PATCH 1/2] ldso: fix pointer width problem with debug statement

2011-11-01 Thread William Pitcock
On 64-bit platforms, the compiler copies a 64-bit memory address into an unsigned int, which is 32 bits wide. This should be unsigned long, because unsigned long will always be the width of a long pointer, which is 64-bit on 64-bit platforms instead of 32-bit. Signed-off-by: William Pitcock ---

[PATCH 1/3] libm: implement generic cexp(), cexpf() and cexpl().

2011-11-01 Thread William Pitcock
The cexp*() family of functions is defined by the C99 math standard as implementing exponential functions for complex types. Signed-off-by: William Pitcock --- libm/Makefile.in |3 +- libm/cexp.c | 63 ++ 2 files changed, 65 insertio

[PATCH 2/3] libm: add cabsf() and cabsl() functions.

2011-11-01 Thread William Pitcock
Signed-off-by: William Pitcock --- libm/w_cabs.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/libm/w_cabs.c b/libm/w_cabs.c index 4044f4b..b259248 100644 --- a/libm/w_cabs.c +++ b/libm/w_cabs.c @@ -13,3 +13,19 @@ double cabs(double _Complex z) r

[PATCH 3/3] libm: implement a generic sincos().

2011-11-01 Thread William Pitcock
We already provide sincos() on some archs, so we should ship a generic version. Signed-off-by: William Pitcock --- libc/sysdeps/linux/common/bits/mathcalls.h |2 +- libm/Makefile.in |2 +- libm/sincos.c | 48 +++

Re: [PATCH 2/2] libdl: fix pointer-width problems with _dl_tls_symaddr() calls.

2011-11-01 Thread Carmelo AMOROSO
On 01/11/2011 23.51, William Pitcock wrote: > Casting a pointer to Elf32_Addr type will discard 32 bits from the > pointer address. Using unsigned long ensures that a pointer is 64-bit > safe. > > Signed-off-by: William Pitcock > --- > ldso/libdl/libdl.c |2 +- > 1 files changed, 1 insertio