[postgis-tickets] r16692 - PG 12: Use standard macros for float limits
Raul
raul at rmr.ninja
Mon Aug 13 03:31:46 PDT 2018
Author: algunenano
Date: 2018-08-13 03:31:45 -0700 (Mon, 13 Aug 2018)
New Revision: 16692
Modified:
trunk/NEWS
trunk/postgis/gserialized_spgist_2d.c
trunk/postgis/gserialized_spgist_3d.c
Log:
PG 12: Use standard macros for float limits
Closes #4146
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2018-08-11 10:45:25 UTC (rev 16691)
+++ trunk/NEWS 2018-08-13 10:31:45 UTC (rev 16692)
@@ -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
Modified: trunk/postgis/gserialized_spgist_2d.c
===================================================================
--- trunk/postgis/gserialized_spgist_2d.c 2018-08-11 10:45:25 UTC (rev 16691)
+++ trunk/postgis/gserialized_spgist_2d.c 2018-08-13 10:31:45 UTC (rev 16692)
@@ -155,7 +155,7 @@
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;
Modified: trunk/postgis/gserialized_spgist_3d.c
===================================================================
--- trunk/postgis/gserialized_spgist_3d.c 2018-08-11 10:45:25 UTC (rev 16691)
+++ trunk/postgis/gserialized_spgist_3d.c 2018-08-13 10:31:45 UTC (rev 16692)
@@ -74,6 +74,8 @@
#include "lwgeom_box3d.h"
#include "lwgeom_pg.h"
+#include <float.h>
+
PG_FUNCTION_INFO_V1(gserialized_overlaps_3d);
Datum gserialized_overlaps_3d(PG_FUNCTION_ARGS)
{
@@ -189,7 +191,7 @@
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;
More information about the postgis-tickets
mailing list