commit dfdda6d97f72cc34c1bef9b690652941eaa08a7f
Author:     Emre Hasegeli <emre@hasegeli.com>
AuthorDate: 2018-07-10 17:26:59 +0200
Commit:     Emre Hasegeli <emre@hasegeli.com>
CommitDate: 2018-07-10 19:28:17 +0200

    Include <float.h> from win32_port.h

diff --git a/src/backend/access/gist/gistproc.c b/src/backend/access/gist/gistproc.c
index 97e6dc9910..0536b318cc 100644
--- a/src/backend/access/gist/gistproc.c
+++ b/src/backend/access/gist/gistproc.c
@@ -10,21 +10,20 @@
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
  *	src/backend/access/gist/gistproc.c
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
-#include <float.h>
 #include <math.h>
 
 #include "access/gist.h"
 #include "access/stratnum.h"
 #include "utils/builtins.h"
 #include "utils/geo_decls.h"
 
 
 static bool gist_box_leaf_consistent(BOX *key, BOX *query,
 						 StrategyNumber strategy);
diff --git a/src/backend/access/gist/gistutil.c b/src/backend/access/gist/gistutil.c
index 55cccd247a..12804c321c 100644
--- a/src/backend/access/gist/gistutil.c
+++ b/src/backend/access/gist/gistutil.c
@@ -6,21 +6,20 @@
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
  *			src/backend/access/gist/gistutil.c
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
-#include <float.h>
 #include <math.h>
 
 #include "access/gist_private.h"
 #include "access/htup_details.h"
 #include "access/reloptions.h"
 #include "catalog/pg_opclass.h"
 #include "storage/indexfsm.h"
 #include "storage/lmgr.h"
 #include "utils/builtins.h"
 #include "utils/syscache.h"
diff --git a/src/backend/access/tablesample/bernoulli.c b/src/backend/access/tablesample/bernoulli.c
index 1f2a933935..fba62e7b16 100644
--- a/src/backend/access/tablesample/bernoulli.c
+++ b/src/backend/access/tablesample/bernoulli.c
@@ -17,23 +17,20 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
  *	  src/backend/access/tablesample/bernoulli.c
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
-#ifdef _MSC_VER
-#include <float.h>				/* for _isnan */
-#endif
 #include <math.h>
 
 #include "access/hash.h"
 #include "access/tsmapi.h"
 #include "catalog/pg_type.h"
 #include "optimizer/clauses.h"
 #include "optimizer/cost.h"
 #include "utils/builtins.h"
 
 
diff --git a/src/backend/access/tablesample/system.c b/src/backend/access/tablesample/system.c
index f888e04f40..4d937b4258 100644
--- a/src/backend/access/tablesample/system.c
+++ b/src/backend/access/tablesample/system.c
@@ -17,23 +17,20 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
  *	  src/backend/access/tablesample/system.c
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
-#ifdef _MSC_VER
-#include <float.h>				/* for _isnan */
-#endif
 #include <math.h>
 
 #include "access/hash.h"
 #include "access/relscan.h"
 #include "access/tsmapi.h"
 #include "catalog/pg_type.h"
 #include "optimizer/clauses.h"
 #include "optimizer/cost.h"
 #include "utils/builtins.h"
 
diff --git a/src/backend/optimizer/path/costsize.c b/src/backend/optimizer/path/costsize.c
index a2a7e0c520..a6811e0338 100644
--- a/src/backend/optimizer/path/costsize.c
+++ b/src/backend/optimizer/path/costsize.c
@@ -64,23 +64,20 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
  *	  src/backend/optimizer/path/costsize.c
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
-#ifdef _MSC_VER
-#include <float.h>				/* for _isnan */
-#endif
 #include <math.h>
 
 #include "access/amapi.h"
 #include "access/htup_details.h"
 #include "access/tsmapi.h"
 #include "executor/executor.h"
 #include "executor/nodeHash.h"
 #include "miscadmin.h"
 #include "nodes/nodeFuncs.h"
 #include "optimizer/clauses.h"
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c
index 0cbdbe5587..0c6c9da253 100644
--- a/src/backend/utils/adt/arrayfuncs.c
+++ b/src/backend/utils/adt/arrayfuncs.c
@@ -8,23 +8,20 @@
  *
  *
  * IDENTIFICATION
  *	  src/backend/utils/adt/arrayfuncs.c
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
 #include <ctype.h>
-#ifdef _MSC_VER
-#include <float.h>				/* for _isnan */
-#endif
 #include <math.h>
 
 #include "access/hash.h"
 #include "access/htup_details.h"
 #include "catalog/pg_type.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
 #include "utils/array.h"
 #include "utils/arrayaccess.h"
 #include "utils/builtins.h"
diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c
index 979f6fd7b2..017cc1a7b1 100644
--- a/src/backend/utils/adt/datetime.c
+++ b/src/backend/utils/adt/datetime.c
@@ -8,21 +8,20 @@
  *
  *
  * IDENTIFICATION
  *	  src/backend/utils/adt/datetime.c
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
 #include <ctype.h>
-#include <float.h>
 #include <limits.h>
 #include <math.h>
 
 #include "access/htup_details.h"
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "common/string.h"
 #include "funcapi.h"
 #include "miscadmin.h"
 #include "nodes/nodeFuncs.h"
diff --git a/src/backend/utils/adt/orderedsetaggs.c b/src/backend/utils/adt/orderedsetaggs.c
index 5867f3df07..be9422dcfb 100644
--- a/src/backend/utils/adt/orderedsetaggs.c
+++ b/src/backend/utils/adt/orderedsetaggs.c
@@ -7,21 +7,20 @@
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  *
  * IDENTIFICATION
  *	  src/backend/utils/adt/orderedsetaggs.c
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
-#include <float.h>
 #include <math.h>
 
 #include "catalog/pg_aggregate.h"
 #include "catalog/pg_operator.h"
 #include "catalog/pg_type.h"
 #include "executor/executor.h"
 #include "miscadmin.h"
 #include "nodes/nodeFuncs.h"
 #include "optimizer/tlist.h"
 #include "utils/array.h"
diff --git a/src/backend/utils/adt/selfuncs.c b/src/backend/utils/adt/selfuncs.c
index 4b08cdb721..f1c78ffb65 100644
--- a/src/backend/utils/adt/selfuncs.c
+++ b/src/backend/utils/adt/selfuncs.c
@@ -91,21 +91,20 @@
  * collation.  Thus, in most cases where we are looking at statistics, we
  * should ignore the actual operator collation and use DEFAULT_COLLATION_OID.
  * We expect that the error induced by doing this is usually not large enough
  * to justify complicating matters.
  *----------
  */
 
 #include "postgres.h"
 
 #include <ctype.h>
-#include <float.h>
 #include <math.h>
 
 #include "access/brin.h"
 #include "access/gin.h"
 #include "access/htup_details.h"
 #include "access/sysattr.h"
 #include "catalog/index.h"
 #include "catalog/pg_am.h"
 #include "catalog/pg_collation.h"
 #include "catalog/pg_operator.h"
diff --git a/src/backend/utils/adt/timestamp.c b/src/backend/utils/adt/timestamp.c
index 1d75caebe1..b98036f200 100644
--- a/src/backend/utils/adt/timestamp.c
+++ b/src/backend/utils/adt/timestamp.c
@@ -10,21 +10,20 @@
  * IDENTIFICATION
  *	  src/backend/utils/adt/timestamp.c
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
 #include <ctype.h>
 #include <math.h>
-#include <float.h>
 #include <limits.h>
 #include <sys/time.h>
 
 #include "access/hash.h"
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "common/int128.h"
 #include "funcapi.h"
 #include "libpq/pqformat.h"
 #include "miscadmin.h"
diff --git a/src/backend/utils/misc/help_config.c b/src/backend/utils/misc/help_config.c
index 25f5c82804..871c535756 100644
--- a/src/backend/utils/misc/help_config.c
+++ b/src/backend/utils/misc/help_config.c
@@ -9,21 +9,20 @@
  *
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  *
  * IDENTIFICATION
  *	  src/backend/utils/misc/help_config.c
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
-#include <float.h>
 #include <limits.h>
 #include <unistd.h>
 
 #include "utils/guc_tables.h"
 #include "utils/help_config.h"
 
 
 /*
  * This union allows us to mix the numerous different types of structs
  * that we are organizing.
diff --git a/src/include/port/win32_port.h b/src/include/port/win32_port.h
index d31c28f7d4..937d91f927 100644
--- a/src/include/port/win32_port.h
+++ b/src/include/port/win32_port.h
@@ -495,21 +495,23 @@ typedef long ssize_t;
 #else
 typedef __int64 ssize_t;
 #endif
 
 typedef unsigned short mode_t;
 
 #define F_OK 0
 #define W_OK 2
 #define R_OK 4
 
+/* Those functions are not presented on <math.h> on older versions. */
 #if (_MSC_VER < 1800)
+#include <float.h>
 #define isinf(x) ((_fpclass(x) == _FPCLASS_PINF) || (_fpclass(x) == _FPCLASS_NINF))
 #define isnan(x) _isnan(x)
 #endif
 
 /* Pulled from Makefile.port in MinGW */
 #define DLSUFFIX ".dll"
 
 #endif							/* _MSC_VER */
 
 #endif							/* PG_WIN32_PORT_H */
diff --git a/src/interfaces/ecpg/pgtypeslib/datetime.c b/src/interfaces/ecpg/pgtypeslib/datetime.c
index 1e692a5f9e..ed321febf2 100644
--- a/src/interfaces/ecpg/pgtypeslib/datetime.c
+++ b/src/interfaces/ecpg/pgtypeslib/datetime.c
@@ -1,17 +1,16 @@
 /* src/interfaces/ecpg/pgtypeslib/datetime.c */
 
 #include "postgres_fe.h"
 
 #include <time.h>
 #include <ctype.h>
-#include <float.h>
 #include <limits.h>
 
 #include "extern.h"
 #include "dt.h"
 #include "pgtypes_error.h"
 #include "pgtypes_date.h"
 
 date *
 PGTYPESdate_new(void)
 {
diff --git a/src/port/rint.c b/src/port/rint.c
index d27fdfa6b4..d59d9ab774 100644
--- a/src/port/rint.c
+++ b/src/port/rint.c
@@ -5,21 +5,20 @@
  *
  * By Pedro Gimeno Fortea, donated to the public domain
  *
  * IDENTIFICATION
  *	  src/port/rint.c
  *
  *-------------------------------------------------------------------------
  */
 #include "c.h"
 
-#include <float.h>
 #include <math.h>
 
 /*
  * Round to nearest integer, with halfway cases going to the nearest even.
  */
 double
 rint(double x)
 {
 	double		x_orig;
 	double		r;
diff --git a/src/port/snprintf.c b/src/port/snprintf.c
index 8358425980..a184134ee6 100644
--- a/src/port/snprintf.c
+++ b/src/port/snprintf.c
@@ -26,23 +26,20 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
  * src/port/snprintf.c
  */
 
 #include "c.h"
 
 #include <ctype.h>
-#ifdef _MSC_VER
-#include <float.h>				/* for _isnan */
-#endif
 #include <limits.h>
 #include <math.h>
 #ifndef WIN32
 #include <sys/ioctl.h>
 #endif
 #include <sys/param.h>
 
 #ifndef NL_ARGMAX
 #define NL_ARGMAX 16
 #endif
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 7060b6fbf3..97a50f30e7 100644
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -9,21 +9,20 @@
  * Portions Copyright (c) 1996-2018, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
  * src/test/regress/regress.c
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
-#include <float.h>
 #include <math.h>
 #include <signal.h>
 
 #include "access/htup_details.h"
 #include "access/transam.h"
 #include "access/tuptoaster.h"
 #include "access/xact.h"
 #include "catalog/pg_type.h"
 #include "commands/sequence.h"
 #include "commands/trigger.h"
