From 78c0afb2a7cf2780c28166502d8784230b904504 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sat, 27 Feb 2016 17:26:15 +0100 Subject: [PATCH] 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. --- ld128/s_nanl.c | 2 +- ld80/s_nanl.c | 2 +- src/math_private.h | 2 +- src/math_private_openbsd.h | 2 +- src/s_nan.c | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ld128/s_nanl.c b/ld128/s_nanl.c index 66e6fa5..336d8cf 100644 --- a/ld128/s_nanl.c +++ b/ld128/s_nanl.c @@ -39,7 +39,7 @@ nanl(const char *s) uint32_t bits[4]; } u; - _scan_nan(u.bits, 4, s); + __scan_nan(u.bits, 4, s); u.ieee.bits.exp = 0x7fff; u.ieee.bits.manh |= 1ULL << 47; /* make it a quiet NaN */ return (u.ieee.e); diff --git a/ld80/s_nanl.c b/ld80/s_nanl.c index d649968..2b24691 100644 --- a/ld80/s_nanl.c +++ b/ld80/s_nanl.c @@ -38,7 +38,7 @@ nanl(const char *s) uint32_t bits[3]; } u; - _scan_nan(u.bits, 3, s); + __scan_nan(u.bits, 3, s); u.ieee.bits.exp = 0x7fff; u.ieee.bits.manh |= 0xc0000000; /* make it a quiet NaN */ return (u.ieee.e); diff --git a/src/math_private.h b/src/math_private.h index 7bfd76b..daabcea 100644 --- a/src/math_private.h +++ b/src/math_private.h @@ -229,7 +229,7 @@ do { \ /* * Common routine to process the arguments to nan(), nanf(), and nanl(). */ -void _scan_nan(u_int32_t *__words, int __num_words, const char *__s); +void __scan_nan(u_int32_t *__words, int __num_words, const char *__s); #ifdef __GNUCLIKE_ASM diff --git a/src/math_private_openbsd.h b/src/math_private_openbsd.h index bd0e5b2..8a1774c 100644 --- a/src/math_private_openbsd.h +++ b/src/math_private_openbsd.h @@ -205,7 +205,7 @@ do { \ /* * Common routine to process the arguments to nan(), nanf(), and nanl(). */ -void _scan_nan(uint32_t *__words, int __num_words, const char *__s); +void __scan_nan(uint32_t *__words, int __num_words, const char *__s); /* * Functions internal to the math package, yet not static. diff --git a/src/s_nan.c b/src/s_nan.c index 6b3631b..95f538e 100644 --- a/src/s_nan.c +++ b/src/s_nan.c @@ -62,7 +62,7 @@ static __inline int digittoint(int c) { * impossible to use nan(3) portably anyway, so this seems good enough. */ DLLEXPORT void -_scan_nan(u_int32_t *words, int num_words, const char *s) +__scan_nan(u_int32_t *words, int num_words, const char *s) { int si; /* index into s */ int bitpos; /* index into words (in bits) */ @@ -97,7 +97,7 @@ nan(const char *s) u_int32_t bits[2]; } u; - _scan_nan(u.bits, 2, s); + __scan_nan(u.bits, 2, s); #if _BYTE_ORDER == _LITTLE_ENDIAN u.bits[1] |= 0x7ff80000; #else @@ -114,7 +114,7 @@ nanf(const char *s) u_int32_t bits[1]; } u; - _scan_nan(u.bits, 1, s); + __scan_nan(u.bits, 1, s); u.bits[0] |= 0x7fc00000; return (u.f); }