summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2015-10-21 10:36:11 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2015-10-21 10:36:11 +0900
commit68ba386213615459903721870cbe400990dc8311 (patch)
treefc82f5023873172790e7279f64acca109237619d
parentfc4f0b9be7133dc901d02bb938e90ffd1487e50a (diff)
parent1a98512831588e30864e6c98040724e53ab3687c (diff)
downloadmruby-68ba386213615459903721870cbe400990dc8311.tar.gz
mruby-68ba386213615459903721870cbe400990dc8311.zip
Merge pull request #2879 from cremno/call-always-frexp-instead-of-frexpl
call always frexp() instead of frexpl()
-rw-r--r--src/fmt_fp.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/fmt_fp.c b/src/fmt_fp.c
index b27ebd6e9..0df0bb5cc 100644
--- a/src/fmt_fp.c
+++ b/src/fmt_fp.c
@@ -90,11 +90,6 @@ fmt_u(uint32_t x, char *s)
typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double)];
#endif
-#if ((defined(__CYGWIN__) || defined(__NetBSD__) || defined(mips)) && !defined(__linux__)) || defined(__android__)
-#undef frexpl
-#define frexpl frexp
-#endif
-
static int
fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t)
{
@@ -127,7 +122,7 @@ fmt_fp(struct fmt_args *f, long double y, int w, int p, int fl, int t)
return MAX(w, 3+pl);
}
- y = frexpl(y, &e2) * 2;
+ y = frexp((double)y, &e2) * 2;
if (y) e2--;
if ((t|32)=='a') {