Skip to content

Commit 1bba495

Browse files
committed
Merge pull request #124 from NuxiNL/cloudabi-fixes
Upstream local modifications to openlibm.
2 parents 4ef4170 + 62c7361 commit 1bba495

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

ld128/s_nanl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ nanl(const char *s)
3939
uint32_t bits[4];
4040
} u;
4141

42-
_scan_nan(u.bits, 4, s);
42+
__scan_nan(u.bits, 4, s);
4343
u.ieee.bits.exp = 0x7fff;
4444
u.ieee.bits.manh |= 1ULL << 47; /* make it a quiet NaN */
4545
return (u.ieee.e);

ld80/s_nanl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ nanl(const char *s)
3838
uint32_t bits[3];
3939
} u;
4040

41-
_scan_nan(u.bits, 3, s);
41+
__scan_nan(u.bits, 3, s);
4242
u.ieee.bits.exp = 0x7fff;
4343
u.ieee.bits.manh |= 0xc0000000; /* make it a quiet NaN */
4444
return (u.ieee.e);

src/math_private.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ do { \
229229
/*
230230
* Common routine to process the arguments to nan(), nanf(), and nanl().
231231
*/
232-
void _scan_nan(u_int32_t *__words, int __num_words, const char *__s);
232+
void __scan_nan(u_int32_t *__words, int __num_words, const char *__s);
233233

234234
#ifdef __GNUCLIKE_ASM
235235

src/math_private_openbsd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ do { \
205205
/*
206206
* Common routine to process the arguments to nan(), nanf(), and nanl().
207207
*/
208-
void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
208+
void __scan_nan(uint32_t *__words, int __num_words, const char *__s);
209209

210210
/*
211211
* Functions internal to the math package, yet not static.

src/s_exp2.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,14 +375,14 @@ exp2(double x)
375375
/* Compute r = exp2(y) = exp2t[i0] * p(z - eps[i]). */
376376
t = tbl[i0]; /* exp2t[i0] */
377377
z -= tbl[i0 + 1]; /* eps[i0] */
378-
if (k >= -1021 << 20)
378+
if (k >= -(1021 << 20))
379379
INSERT_WORDS(twopk, 0x3ff00000 + k, 0);
380380
else
381381
INSERT_WORDS(twopkp1000, 0x3ff00000 + k + (1000 << 20), 0);
382382
r = t + t * z * (P1 + z * (P2 + z * (P3 + z * (P4 + z * P5))));
383383

384384
/* Scale by 2**(k>>20). */
385-
if(k >= -1021 << 20) {
385+
if(k >= -(1021 << 20)) {
386386
if (k == 1024 << 20)
387387
return (r * 2.0 * 0x1p1023);
388388
return (r * twopk);

src/s_nan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static __inline int digittoint(int c) {
6262
* impossible to use nan(3) portably anyway, so this seems good enough.
6363
*/
6464
DLLEXPORT void
65-
_scan_nan(u_int32_t *words, int num_words, const char *s)
65+
__scan_nan(u_int32_t *words, int num_words, const char *s)
6666
{
6767
int si; /* index into s */
6868
int bitpos; /* index into words (in bits) */
@@ -97,7 +97,7 @@ nan(const char *s)
9797
u_int32_t bits[2];
9898
} u;
9999

100-
_scan_nan(u.bits, 2, s);
100+
__scan_nan(u.bits, 2, s);
101101
#if _BYTE_ORDER == _LITTLE_ENDIAN
102102
u.bits[1] |= 0x7ff80000;
103103
#else
@@ -114,7 +114,7 @@ nanf(const char *s)
114114
u_int32_t bits[1];
115115
} u;
116116

117-
_scan_nan(u.bits, 1, s);
117+
__scan_nan(u.bits, 1, s);
118118
u.bits[0] |= 0x7fc00000;
119119
return (u.f);
120120
}

0 commit comments

Comments
 (0)