Update signbit functions to work on targets where integers are only 16-bits.

* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
	(__signbitd): Likewise.
This commit is contained in:
Nick Clifton 2015-05-13 09:34:37 +01:00
parent 474fb80297
commit d958183ba4
2 changed files with 9 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2015-05-13 Nick Clifton <nickc@redhat.com>
* libm/common/s_signbit.c (__signbitf): Fix for 16-bit targets.
(__signbitd): Likewise.
2015-05-02 Corinna Vinschen <vinschen@redhat.com>
* libc/include/sys/time.h: Include sys/select.h on Cygwin. Explain why.

View File

@ -41,19 +41,19 @@ int __signbitd (double x);
int
__signbitf (float x)
{
unsigned int w;
__uint32_t w;
GET_FLOAT_WORD(w,x);
return (w & 0x80000000);
return (w & 0x80000000) != 0;
}
int
__signbitd (double x)
{
unsigned int msw;
__uint32_t msw;
GET_HIGH_WORD(msw, x);
return (msw & 0x80000000);
return (msw & 0x80000000) != 0;
}