enhanced __float128 handling

added qse_strvfmt() and qse_strxvfmt()
This commit is contained in:
2013-11-03 16:01:39 +00:00
parent fa47ad2965
commit 91c9182ad7
54 changed files with 447 additions and 248 deletions

118
qse/configure vendored
View File

@ -667,6 +667,7 @@ SSL_LIBS
UNICOWS_LIBS
SENDFILE_LIBS
SOCKET_LIBS
QUADMATH_LIBS
LIBM
WIN32_FALSE
WIN32_TRUE
@ -17091,6 +17092,10 @@ case "$host" in
*-*-mingw*|*-*-cygwin*)
#CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0400"
platform_win32=yes
;;
*)
platform_win32=no
;;
esac
if test "${platform_win32}" = "yes" ; then
WIN32_TRUE=
@ -17442,7 +17447,7 @@ fi
done
for ac_header in crt_externs.h sys/prctl.h uci.h
for ac_header in quadmath.h crt_externs.h sys/prctl.h uci.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@ -17661,6 +17666,117 @@ done
LIBS="$OLDLIBS"
if test "${platform_win32}" = "no"
then
for ac_func in quadmath_snprintf
do :
ac_fn_c_check_func "$LINENO" "quadmath_snprintf" "ac_cv_func_quadmath_snprintf"
if test "x$ac_cv_func_quadmath_snprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_QUADMATH_SNPRINTF 1
_ACEOF
fi
done
if test "$ac_cv_func_quadmath_snprintf" = "no"
then
OLDLIBS="$LIBS"
LIBS="$LIBM $LIBS"
for ac_func in quadmath_snprintf
do :
ac_fn_c_check_func "$LINENO" "quadmath_snprintf" "ac_cv_func_quadmath_snprintf"
if test "x$ac_cv_func_quadmath_snprintf" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_QUADMATH_SNPRINTF 1
_ACEOF
fi
done
LIBS="$OLDLIBS"
if test "$ac_cv_func_quadmath_snprintf" = "no"
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for quadmath_snprintf in -lquadmath" >&5
$as_echo_n "checking for quadmath_snprintf in -lquadmath... " >&6; }
if ${ac_cv_lib_quadmath_quadmath_snprintf+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lquadmath $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char quadmath_snprintf ();
int
main ()
{
return quadmath_snprintf ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_quadmath_quadmath_snprintf=yes
else
ac_cv_lib_quadmath_quadmath_snprintf=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_quadmath_quadmath_snprintf" >&5
$as_echo "$ac_cv_lib_quadmath_quadmath_snprintf" >&6; }
if test "x$ac_cv_lib_quadmath_quadmath_snprintf" = xyes; then :
QUADMATH_LIBS="-lquadmath"
LIBM="$LIBM -lquadmath"
$as_echo "#define HAVE_QUADMATH_SNPRINTF 1" >>confdefs.h
fi
else
QUADMATH_LIBS="$LIBM"
fi
fi
OLDLIBS="$LIBS"
LIBS="$LIBM $LIBS"
for ac_func in powq fmodq sinq cosq tanq atanq atan2q logq log10q expq sqrtq ceilq floorq roundq
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_func in strtoflt128
do :
ac_fn_c_check_func "$LINENO" "strtoflt128" "ac_cv_func_strtoflt128"
if test "x$ac_cv_func_strtoflt128" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRTOFLT128 1
_ACEOF
fi
done
LIBS="$OLDLIBS"
fi
for ac_func in connect gethostbyname
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`