Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libm/ld/s_ilogbl.c')
-rw-r--r--newlib/libm/ld/s_ilogbl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/newlib/libm/ld/s_ilogbl.c b/newlib/libm/ld/s_ilogbl.c
index 3211f4409..14c632796 100644
--- a/newlib/libm/ld/s_ilogbl.c
+++ b/newlib/libm/ld/s_ilogbl.c
@@ -16,6 +16,7 @@ __FBSDID("$FreeBSD$");
#include <float.h>
#include <limits.h>
#include <math.h>
+#include <stdint.h>
#include "fpmath.h"
@@ -23,7 +24,7 @@ int
ilogbl(long double x)
{
union IEEEl2bits u;
- unsigned long m;
+ uint64_t m;
int b;
u.e = x;
@@ -32,11 +33,11 @@ ilogbl(long double x)
return (FP_ILOGB0);
/* denormalized */
if (u.bits.manh == 0) {
- m = 1lu << (LDBL_MANL_SIZE - 1);
+ m = 1llu << (LDBL_MANL_SIZE - 1);
for (b = LDBL_MANH_SIZE; !(u.bits.manl & m); m >>= 1)
b++;
} else {
- m = 1lu << (LDBL_MANH_SIZE - 1);
+ m = 1llu << (LDBL_MANH_SIZE - 1);
for (b = 0; !(u.bits.manh & m); m >>= 1)
b++;
}