1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +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

View File

@@ -385,6 +385,11 @@ extern int isinf(double x);
extern float strtof(const char *nptr, char **endptr);
#endif
#ifdef HAVE_BUGGY_STRTOF
extern float pg_strtof(const char *nptr, char **endptr);
#define strtof(a,b) (pg_strtof((a),(b)))
#endif
#ifndef HAVE_MKDTEMP
extern char *mkdtemp(char *path);
#endif