summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2016-08-20 23:52:01 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2016-08-20 23:52:01 +0900
commit4b2810ab2d6be3d1cf811e53d3b4f57630821108 (patch)
tree818d7747920e1fd33d589f4a6028fd22368d4db0
parent1c6d3e3f04363b252be7cd3f6f1a7fa29e522227 (diff)
downloadzsh-4b2810ab2d6be3d1cf811e53d3b4f57630821108.tar.gz
zsh-4b2810ab2d6be3d1cf811e53d3b4f57630821108.tar.xz
zsh-4b2810ab2d6be3d1cf811e53d3b4f57630821108.zip
39064: use scalbn() instead of scalb() (mathfunc.c)
-rw-r--r--ChangeLog5
-rw-r--r--Src/Modules/mathfunc.c4
-rw-r--r--configure.ac1
3 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e224beebf..65263033a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-08-20  Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
+
+	* 39064: configure.ac, Src/Modules/mathfuc.c: use scalbn() instead
+	of scalb()
+
 2016-08-20  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 39074: Completion/Unix/Command/_ip: _ip-neighbour: Fix typo in
diff --git a/Src/Modules/mathfunc.c b/Src/Modules/mathfunc.c
index 451b3cfeb..a7e8b294c 100644
--- a/Src/Modules/mathfunc.c
+++ b/Src/Modules/mathfunc.c
@@ -411,7 +411,11 @@ math_func(char *name, int argc, mnumber *argv, int id)
       break;
 
   case MF_SCALB:
+#ifdef HAVE_SCALBN
+      retd = scalbn(argd, argi);
+#else
       retd = scalb(argd, argi);
+#endif
       break;
 
 #ifdef HAVE_SIGNGAM
diff --git a/configure.ac b/configure.ac
index bac62a638..0e0bd535a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1305,6 +1305,7 @@ AC_CHECK_FUNCS(strftime strptime mktime timelocal \
 	       setlocale \
 	       uname \
 	       signgam tgamma \
+	       scalbn \
 	       putenv getenv setenv unsetenv xw\
 	       brk sbrk \
 	       pathconf sysconf \