Skip to content
Permalink
Browse files
A speculative fix for some compilation problems as a result of commit
r5887. May need more tweaking...


git-svn-id: http://svn.osgeo.org/qgis/trunk@5890 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Sep 30, 2006
1 parent 80084da commit b906049bda211ebca3fccf7e462b4a65165e75e7
Showing with 23 additions and 9 deletions.
  1. +11 −0 configure.in
  2. +12 −9 src/providers/wms/qgswmsprovider.cpp
@@ -100,6 +100,17 @@ dnl GDAL/OGR
dnl ---------------------------------------------------------------------------
AQ_CHECK_GDAL

dnl ---------------------------------------------------------------------------
dnl Whether to use isfinite or std::isfinite
dnl ---------------------------------------------------------------------------
have_stdisfinite=no
AC_MSG_CHECKING([[<cmath> for std::isfinite]])
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <cmath>]], [[ std::isfinite(0) ]]),
[[have_stdisfinite=yes]
AC_DEFINE(HAVE_STDISFINITE,1,[Define to 1 if std::isfinite is available])
], [])
AC_MSG_RESULT([[$have_stdisfinite]])

dnl ---------------------------------------------------------------------------
dnl GEOS
dnl ---------------------------------------------------------------------------
@@ -18,9 +18,13 @@

/* $Id$ */

#define _GLIBCPP_USE_C99 1
#include <cmath>
#undef _GLIBCPP_USE_C99
#include "qgsconfig.h"

#ifdef HAVE_STDISFINITE
#include <cmath>
#else
#include <math.h>
#endif

#include "qgslogger.h"
#include "qgswmsprovider.h"
@@ -33,8 +37,7 @@

#include "qgshttptransaction.h"

#include <q3url.h>
#include <Q3Picture>
#include <Q3Url>


#ifdef QGISDEBUG
@@ -1951,12 +1954,12 @@ bool QgsWmsProvider::calculateExtent()
}

//make sure extent does not contain 'inf' or 'nan'
#if __GNUC__ >= 4
if(!isfinite(extent.xMin()) || !isfinite((int)extent.yMin()) || !isfinite(extent.xMax()) || \
!isfinite((int)extent.yMax()))
#else
#ifdef HAVE_STDISFINITE
if(!std::isfinite(extent.xMin()) || !std::isfinite((int)extent.yMin()) || !std::isfinite(extent.xMax()) || \
!std::isfinite((int)extent.yMax()))
#else
if(!isfinite(extent.xMin()) || !isfinite((int)extent.yMin()) || !isfinite(extent.xMax()) || \
!isfinite((int)extent.yMax()))
#endif
{
continue;

0 comments on commit b906049

Please sign in to comment.