From eb17d348f28f7c8796c36357491761ac3d57c045 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ra=C3=BAl=20Mar=C3=ADn=20Rodr=C3=ADguez?= Date: Mon, 13 Aug 2018 10:31:45 +0000 Subject: [PATCH] PG 12: Use standard macros for float limits Closes #4146 git-svn-id: http://svn.osgeo.org/postgis/trunk@16692 b70326c6-7e19-0410-871a-916f4a2858ee --- NEWS | 5 +++++ postgis/gserialized_spgist_2d.c | 2 +- postgis/gserialized_spgist_3d.c | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 81d68abf2..4b0b51f44 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +PostGIS 2.5.0rc1 +2018/XX/XX +New since PostGIS 2.5.0beta2 + - #4146, Fix compilation error against Postgres 12 (Raúl Marín). + PostGIS 2.5.0beta2 2018/08/11 New since PostGIS 2.5.0beta1 diff --git a/postgis/gserialized_spgist_2d.c b/postgis/gserialized_spgist_2d.c index 8f8ff7609..da24cef3e 100644 --- a/postgis/gserialized_spgist_2d.c +++ b/postgis/gserialized_spgist_2d.c @@ -155,7 +155,7 @@ static RectBox * initRectBox(void) { RectBox *rect_box = (RectBox *)palloc(sizeof(RectBox)); - float infinity = get_float4_infinity(); + float infinity = FLT_MAX; rect_box->left.xmin = -infinity; rect_box->left.xmax = infinity; diff --git a/postgis/gserialized_spgist_3d.c b/postgis/gserialized_spgist_3d.c index 2b8e8c650..f4d340d87 100644 --- a/postgis/gserialized_spgist_3d.c +++ b/postgis/gserialized_spgist_3d.c @@ -74,6 +74,8 @@ #include "lwgeom_box3d.h" #include "lwgeom_pg.h" +#include + PG_FUNCTION_INFO_V1(gserialized_overlaps_3d); Datum gserialized_overlaps_3d(PG_FUNCTION_ARGS) { @@ -189,7 +191,7 @@ static CubeBox3D * initCubeBox(void) { CubeBox3D *cube_box = (CubeBox3D *)palloc(sizeof(CubeBox3D)); - double infinity = get_float8_infinity(); + double infinity = DBL_MAX; cube_box->left.xmin = -infinity; cube_box->left.xmax = infinity; -- 2.40.0