Stefan Dösinger : port: Add isinf and isnan implementations for Visual Studio.
Alexandre Julliard
julliard at winehq.org
Wed May 25 11:28:15 CDT 2011
Module: wine
Branch: master
Commit: a774152f1ad87db57787102620722384dcf9c329
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a774152f1ad87db57787102620722384dcf9c329
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Tue May 24 21:05:28 2011 +0200
port: Add isinf and isnan implementations for Visual Studio.
---
configure | 2 ++
configure.ac | 2 ++
include/config.h.in | 6 ++++++
libs/port/isinf.c | 8 ++++++++
libs/port/isnan.c | 8 ++++++++
5 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index efb2b1f..ea832b5 100755
--- a/configure
+++ b/configure
@@ -12803,6 +12803,8 @@ esac
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $BUILTINFLAG"
for ac_func in \
+ _finite \
+ _isnan \
_pclose \
_popen \
_snprintf \
diff --git a/configure.ac b/configure.ac
index ae44609..683bae9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1939,6 +1939,8 @@ dnl **** Check for functions ****
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $BUILTINFLAG"
AC_CHECK_FUNCS(\
+ _finite \
+ _isnan \
_pclose \
_popen \
_snprintf \
diff --git a/include/config.h.in b/include/config.h.in
index 4bdbc38..04507e0 100644
--- a/include/config.h.in
+++ b/include/config.h.in
@@ -1151,6 +1151,12 @@
/* Define to 1 if you have the <zlib.h> header file. */
#undef HAVE_ZLIB_H
+/* Define to 1 if you have the `_finite' function. */
+#undef HAVE__FINITE
+
+/* Define to 1 if you have the `_isnan' function. */
+#undef HAVE__ISNAN
+
/* Define to 1 if you have the `_pclose' function. */
#undef HAVE__PCLOSE
diff --git a/libs/port/isinf.c b/libs/port/isinf.c
index e0c35ad..fff24aa 100644
--- a/libs/port/isinf.c
+++ b/libs/port/isinf.c
@@ -31,6 +31,14 @@ int isinf(double x)
return (!(finite(x) || isnand(x)));
}
+#elif defined(HAVE_FLOAT_H) && defined(HAVE__ISNAN) && defined(HAVE__FINITE)
+#include <float.h>
+
+int isinf(double x)
+{
+ return (!(_finite(x) || _isnan(x)));
+}
+
#else
#error No isinf() implementation available.
#endif
diff --git a/libs/port/isnan.c b/libs/port/isnan.c
index b2a1be6..c48dd41 100644
--- a/libs/port/isnan.c
+++ b/libs/port/isnan.c
@@ -31,6 +31,14 @@ int isnan(double x)
return isnand(x);
}
+#elif defined(HAVE_FLOAT_H) && defined(HAVE__ISNAN)
+#include <float.h>
+
+int isnan(double x)
+{
+ return _isnan(x);
+}
+
#else
#error No isnan() implementation available.
#endif
More information about the wine-cvs
mailing list