diff --git a/ld80/e_rem_pio2l.h b/ld80/e_rem_pio2l.h index 8406a80..10e20e4 100644 --- a/ld80/e_rem_pio2l.h +++ b/ld80/e_rem_pio2l.h @@ -70,7 +70,11 @@ pio2_2t = 6.36831716351095013979e-25L, /* 0xc51701b839a25205.0p-144 */ pio2_3t = -2.75299651904407171810e-37L; /* -0xbb5bf6c7ddd660ce.0p-185 */ #endif -static inline __always_inline int +//VBS +//static inline __always_inline int +//__ieee754_rem_pio2l(long double x, long double *y) + +static inline int __ieee754_rem_pio2l(long double x, long double *y) { union IEEEl2bits u,u1; diff --git a/src/openlibm.h b/src/openlibm.h index cc97996..acb1341 100644 --- a/src/openlibm.h +++ b/src/openlibm.h @@ -44,8 +44,11 @@ extern const union __nan_un { #endif */ +//VBS begin #define __MATH_BUILTIN_CONSTANTS #define __MATH_BUILTIN_RELOPS +#define __ISO_C_VISIBLE 1999 +//VBS end #ifdef __MATH_BUILTIN_CONSTANTS #define HUGE_VAL __builtin_huge_val() @@ -129,8 +132,9 @@ extern const union __nan_un { : (sizeof (x) == sizeof (double)) ? __signbit(x) \ : __signbitl(x)) -typedef __double_t double_t; -typedef __float_t float_t; +//VBS +//typedef __double_t double_t; +//typedef __float_t float_t; #endif /* __ISO_C_VISIBLE >= 1999 */ /* diff --git a/src/s_floorl.c b/src/s_floorl.c index 30f40a8..544c6f1 100644 --- a/src/s_floorl.c +++ b/src/s_floorl.c @@ -32,7 +32,7 @@ #ifdef LDBL_IMPLICIT_NBIT #define MANH_SIZE (LDBL_MANH_SIZE + 1) #define INC_MANH(u, c) do { \ - u_int64_t o = u.bits.manh; \ + uint64_t o = u.bits.manh; \ u.bits.manh += (c); \ if (u.bits.manh < o) \ u.bits.exp++; \ @@ -40,7 +40,7 @@ #else #define MANH_SIZE LDBL_MANH_SIZE #define INC_MANH(u, c) do { \ - u_int64_t o = u.bits.manh; \ + uint64_t o = u.bits.manh; \ u.bits.manh += (c); \ if (u.bits.manh < o) { \ u.bits.exp++; \ @@ -64,7 +64,7 @@ floorl(long double x) (u.bits.manh | u.bits.manl) != 0) u.e = u.bits.sign ? -1.0 : 0.0; } else { - u_int64_t m = ((1llu << MANH_SIZE) - 1) >> (e + 1); + uint64_t m = ((1llu << MANH_SIZE) - 1) >> (e + 1); if (((u.bits.manh & m) | u.bits.manl) == 0) return (x); /* x is integral */ if (u.bits.sign) { @@ -81,14 +81,14 @@ floorl(long double x) } } } else if (e < LDBL_MANT_DIG - 1) { - u_int64_t m = (u_int64_t)-1 >> (64 - LDBL_MANT_DIG + e + 1); + uint64_t m = (uint64_t)-1 >> (64 - LDBL_MANT_DIG + e + 1); if ((u.bits.manl & m) == 0) return (x); /* x is integral */ if (u.bits.sign) { if (e == MANH_SIZE - 1) INC_MANH(u, 1); else { - u_int64_t o = u.bits.manl; + uint64_t o = u.bits.manl; u.bits.manl += 1llu << (LDBL_MANT_DIG - e - 1); if (u.bits.manl < o) /* got a carry */ INC_MANH(u, 1); diff --git a/src/s_lround.c b/src/s_lround.c index 610e11f..672d48b 100644 --- a/src/s_lround.c +++ b/src/s_lround.c @@ -25,7 +25,10 @@ */ #include -#include +//VBS begin +//#include +#include +//VBS end #include #include diff --git a/src/s_nan.c b/src/s_nan.c index b0a76e7..8a06a39 100644 --- a/src/s_nan.c +++ b/src/s_nan.c @@ -26,7 +26,8 @@ * $FreeBSD: src/lib/msun/src/s_nan.c,v 1.2 2007/12/18 23:46:32 das Exp $ */ -#include +//VBS +//#include #include #include #include diff --git a/src/s_truncl.c b/src/s_truncl.c index 8439fd9..03b15ea 100644 --- a/src/s_truncl.c +++ b/src/s_truncl.c @@ -49,7 +49,7 @@ truncl(long double x) if (huge + x > 0.0) u.e = zero[u.bits.sign]; } else { - u_int64_t m = ((1llu << MANH_SIZE) - 1) >> (e + 1); + uint64_t m = ((1llu << MANH_SIZE) - 1) >> (e + 1); if (((u.bits.manh & m) | u.bits.manl) == 0) return (x); /* x is integral */ if (huge + x > 0.0) { /* raise inexact flag */ @@ -58,7 +58,7 @@ truncl(long double x) } } } else if (e < LDBL_MANT_DIG - 1) { - u_int64_t m = (u_int64_t)-1 >> (64 - LDBL_MANT_DIG + e + 1); + uint64_t m = (uint64_t)-1 >> (64 - LDBL_MANT_DIG + e + 1); if ((u.bits.manl & m) == 0) return (x); /* x is integral */ if (huge + x > 0.0) /* raise inexact flag */