diff --git a/configure b/configure
index eee34f8..808c020 100755
--- a/configure
+++ b/configure
@@ -17611,7 +17611,7 @@
 $as_echo "$dummy_cv_ansi" >&6; }
 
 if test yes = "$dummy_cv_ansi"; then
-    WARNFLAGS="$WARNFLAGS -ansi"
+    WARNFLAGS="$WARNFLAGS"
 else
     :
 fi
diff --git a/include/geos/platform.h.in b/include/geos/platform.h.in
index ab63929..1bb2fae 100644
--- a/include/geos/platform.h.in
+++ b/include/geos/platform.h.in
@@ -84,7 +84,7 @@ extern "C"
 #endif
 
 #if defined(HAVE_ISNAN)
-# define ISNAN(x) (isnan(x))
+# define ISNAN(x) (std::isnan(x))
 #else
 # if defined(_MSC_VER)
 #  define ISNAN(x) _isnan(x)
