Skip to content

Commit 78c0afb

Browse files
committed
Rename _scan_nan() to __scan_nan().
The current tradition of openlibm is to hide all of its internal symbols into the reserved system namespace. CloudABI has a check in place to ensure that its C library (which contains openlibm) to not place any unwanted symbols into the public namespace. openlibm seems to leak _scan_nan() in there, so we'd better add an additional underscore.
1 parent 4ef4170 commit 78c0afb

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

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_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)