1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Cygwin and Mingw floating-point fixes.

Deal with silent-underflow errors in float4 for cygwin and mingw by
using our strtof() wrapper; deal with misrounding errors by adding
them to the resultmap. Some slight reorganization of declarations was
done to avoid duplicating material between cygwin.h and win32_port.h.

While here, remove from the resultmap all references to
float8-small-is-zero; inspection of cygwin output suggests it's no
longer required there, and the freebsd/netbsd/openbsd entries should
no longer be necessary (these date back to c. 2000). This commit
doesn't remove the file itself nor the documentation references for
it; that will happen in a subsequent commit if all goes well.
This commit is contained in:
Andrew Gierth
2019-02-16 01:50:16 +00:00
parent 457aef0f1f
commit 72880ac182
7 changed files with 68 additions and 11 deletions

19
configure vendored
View File

@ -15828,6 +15828,25 @@ fi
case $host_os in
# Cygwin and (apparently, based on test results) Mingw both
# have a broken strtof(), so substitute the same replacement
# code we use with VS2013. That's not a perfect fix, since
# (unlike with VS2013) it doesn't avoid double-rounding, but
# we have no better options. To get that, though, we have to
# force the file to be compiled despite HAVE_STRTOF.
mingw*|cygwin*)
case " $LIBOBJS " in
*" strtof.$ac_objext "* ) ;;
*) LIBOBJS="$LIBOBJS strtof.$ac_objext"
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: On $host_os we will use our strtof wrapper." >&5
$as_echo "$as_me: On $host_os we will use our strtof wrapper." >&6;}
;;
esac
case $host_os in
# Windows uses a specialised env handler