use qecvt_r instead of ecvt_r if available

parent 9d771134
Pipeline #1305 failed with stage
in 147 minutes and 38 seconds
......@@ -1220,6 +1220,7 @@ if test "$host_os" != "nextstep3"
then
AC_FUNC_MEMCMP
fi
AC_HEADER_STDC
AC_CHECK_LIB(dl,dlopen)
AC_REPLACE_FUNCS(memmove strtoul pow10 sincos strerror strsignal atanh)
AC_FUNC_FSEEKO
......@@ -1229,6 +1230,7 @@ AC_DECL_SYS_SIGLIST
AC_CHECK_FUNC(getopt_long,[true],[AC_LIBOBJ(getopt) AC_LIBOBJ(getopt1)])
AC_CHECK_FUNCS(expm1 log1p)
AC_CHECK_FUNCS(mcheck mprobe)
AC_CHECK_FUNCS(qecvt_r)
AC_REPLACE_FUNCS(rint ecvt_r)
#No check for select, because our replacement is no good under
#anything but DOS
......
......@@ -2598,7 +2598,11 @@ if (isnan(r)) {
decpt=0;
strncpy(sig, "nan", 0x3f); /* normalize nan output */
} else {
#ifdef HAVE_QECVT_R
qecvt_r(r, u, &decpt, &flag, sig, 0x3f);
#else
ecvt_r(r, u, &decpt, &flag, sig, 0x3f);
#endif
}
n=(r==0. ? 1 : decpt);
flag=signbit(r); /* not all ecvt()s do this as desired */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment