File tree Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Expand file tree Collapse file tree 2 files changed +23
-9
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,17 @@ dnl GDAL/OGR
100
100
dnl ---------------------------------------------------------------------------
101
101
AQ_CHECK_GDAL
102
102
103
+ dnl ---------------------------------------------------------------------------
104
+ dnl Whether to use isfinite or std::isfinite
105
+ dnl ---------------------------------------------------------------------------
106
+ have_stdisfinite=no
107
+ AC_MSG_CHECKING([[<cmath> for std::isfinite]])
108
+ AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[#include <cmath>]], [[ std::isfinite(0) ]]),
109
+ [[have_stdisfinite=yes]
110
+ AC_DEFINE(HAVE_STDISFINITE,1,[Define to 1 if std::isfinite is available])
111
+ ], [])
112
+ AC_MSG_RESULT([[$have_stdisfinite]])
113
+
103
114
dnl ---------------------------------------------------------------------------
104
115
dnl GEOS
105
116
dnl ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change 18
18
19
19
/* $Id$ */
20
20
21
- #define _GLIBCPP_USE_C99 1
22
- #include < cmath>
23
- #undef _GLIBCPP_USE_C99
21
+ #include " qgsconfig.h"
22
+
23
+ #ifdef HAVE_STDISFINITE
24
+ #include < cmath>
25
+ #else
26
+ #include < math.h>
27
+ #endif
24
28
25
29
#include " qgslogger.h"
26
30
#include " qgswmsprovider.h"
33
37
34
38
#include " qgshttptransaction.h"
35
39
36
- #include < q3url.h>
37
- #include < Q3Picture>
40
+ #include < Q3Url>
38
41
39
42
40
43
#ifdef QGISDEBUG
@@ -1951,12 +1954,12 @@ bool QgsWmsProvider::calculateExtent()
1951
1954
}
1952
1955
1953
1956
// make sure extent does not contain 'inf' or 'nan'
1954
- #if __GNUC__ >= 4
1955
- if (!isfinite (extent.xMin ()) || !isfinite ((int )extent.yMin ()) || !isfinite (extent.xMax ()) || \
1956
- !isfinite ((int )extent.yMax ()))
1957
- #else
1957
+ #ifdef HAVE_STDISFINITE
1958
1958
if (!std::isfinite (extent.xMin ()) || !std::isfinite ((int )extent.yMin ()) || !std::isfinite (extent.xMax ()) || \
1959
1959
!std::isfinite ((int )extent.yMax ()))
1960
+ #else
1961
+ if (!isfinite (extent.xMin ()) || !isfinite ((int )extent.yMin ()) || !isfinite (extent.xMax ()) || \
1962
+ !isfinite ((int )extent.yMax ()))
1960
1963
#endif
1961
1964
{
1962
1965
continue ;
You can’t perform that action at this time.
0 commit comments