From: Sandro Santilli Date: Sat, 18 May 2013 21:07:29 +0000 (+0000) Subject: Use finite() instead of isfinite() X-Git-Tag: 2.1.0beta3~55 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e84d935d96d289769672a4e0d1ff6b52f52ea49c;p=postgis Use finite() instead of isfinite() The former is also already used under postgis/ so we already rely on it. The latter is been reported to be unavailable on Solaris. git-svn-id: http://svn.osgeo.org/postgis/trunk@11471 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/g_box.c b/liblwgeom/g_box.c index 486dc5f4e..6fb8b9238 100644 --- a/liblwgeom/g_box.c +++ b/liblwgeom/g_box.c @@ -12,6 +12,7 @@ #include "liblwgeom_internal.h" #include "lwgeom_log.h" #include +#include GBOX* gbox_new(uint8_t flags) { @@ -145,28 +146,28 @@ int gbox_same(const GBOX *g1, const GBOX *g2) int gbox_is_valid(const GBOX *gbox) { /* X */ - if ( ! isfinite(gbox->xmin) || isnan(gbox->xmin) || - ! isfinite(gbox->xmax) || isnan(gbox->xmax) ) + if ( ! finite(gbox->xmin) || isnan(gbox->xmin) || + ! finite(gbox->xmax) || isnan(gbox->xmax) ) return LW_FALSE; /* Y */ - if ( ! isfinite(gbox->ymin) || isnan(gbox->ymin) || - ! isfinite(gbox->ymax) || isnan(gbox->ymax) ) + if ( ! finite(gbox->ymin) || isnan(gbox->ymin) || + ! finite(gbox->ymax) || isnan(gbox->ymax) ) return LW_FALSE; /* Z */ if ( FLAGS_GET_GEODETIC(gbox->flags) || FLAGS_GET_Z(gbox->flags) ) { - if ( ! isfinite(gbox->zmin) || isnan(gbox->zmin) || - ! isfinite(gbox->zmax) || isnan(gbox->zmax) ) + if ( ! finite(gbox->zmin) || isnan(gbox->zmin) || + ! finite(gbox->zmax) || isnan(gbox->zmax) ) return LW_FALSE; } /* M */ if ( FLAGS_GET_M(gbox->flags) ) { - if ( ! isfinite(gbox->mmin) || isnan(gbox->mmin) || - ! isfinite(gbox->mmax) || isnan(gbox->mmax) ) + if ( ! finite(gbox->mmin) || isnan(gbox->mmin) || + ! finite(gbox->mmax) || isnan(gbox->mmax) ) return LW_FALSE; }