Skip to content

Commit f2c5870

Browse files
committed
Rethink how to get float.h in old Windows API for isnan/isinf
We include <float.h> in every place that needs isnan(), because MSVC used to require it. However, since MSVC 2013 that's no longer necessary (cf. commit cec8394), so we can retire the inclusion to a version-specific stanza in win32_port.h, where it doesn't need to pollute random .c files. The header is of course still needed in a few places for other reasons. I (Álvaro) removed float.h from a few more files than in Emre's original patch. This doesn't break the build in my system, but we'll see what the buildfarm has to say about it all. Author: Emre Hasegeli Discussion: https://postgr.es/m/CAE2gYzyc0+5uG+Cd9-BSL7NKC8LSHLNg1Aq2=8ubjnUwut4_iw@mail.gmail.com
1 parent a01d0fa commit f2c5870

File tree

24 files changed

+7
-35
lines changed

24 files changed

+7
-35
lines changed

contrib/cube/cube.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include "postgres.h"
1010

11-
#include <float.h>
1211
#include <math.h>
1312

1413
#include "access/gist.h"

contrib/jsonb_plperl/jsonb_plperl.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include "postgres.h"
22

3-
#include <float.h>
43
#include <math.h>
54

65
/* Defined by Perl */

contrib/tsm_system_time/tsm_system_time.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
#include "postgres.h"
2626

27-
#ifdef _MSC_VER
28-
#include <float.h> /* for _isnan */
29-
#endif
3027
#include <math.h>
3128

3229
#include "access/relscan.h"

src/backend/access/gist/gistproc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
*/
1818
#include "postgres.h"
1919

20-
#include <float.h>
2120
#include <math.h>
2221

2322
#include "access/gist.h"

src/backend/access/gist/gistutil.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414
#include "postgres.h"
1515

16-
#include <float.h>
1716
#include <math.h>
1817

1918
#include "access/gist_private.h"

src/backend/access/tablesample/bernoulli.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
#include "postgres.h"
2626

27-
#ifdef _MSC_VER
28-
#include <float.h> /* for _isnan */
29-
#endif
3027
#include <math.h>
3128

3229
#include "access/hash.h"

src/backend/access/tablesample/system.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424

2525
#include "postgres.h"
2626

27-
#ifdef _MSC_VER
28-
#include <float.h> /* for _isnan */
29-
#endif
3027
#include <math.h>
3128

3229
#include "access/hash.h"

src/backend/optimizer/path/costsize.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@
7171

7272
#include "postgres.h"
7373

74-
#ifdef _MSC_VER
75-
#include <float.h> /* for _isnan */
76-
#endif
7774
#include <math.h>
7875

7976
#include "access/amapi.h"

src/backend/utils/adt/arrayfuncs.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#include "postgres.h"
1616

1717
#include <ctype.h>
18-
#ifdef _MSC_VER
19-
#include <float.h> /* for _isnan */
20-
#endif
2118
#include <math.h>
2219

2320
#include "access/hash.h"

src/backend/utils/adt/datetime.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "postgres.h"
1616

1717
#include <ctype.h>
18-
#include <float.h>
1918
#include <limits.h>
2019
#include <math.h>
2120

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy