Commit a774152f authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

port: Add isinf and isnan implementations for Visual Studio.

parent cf757a63
......@@ -12803,6 +12803,8 @@ esac
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $BUILTINFLAG"
for ac_func in \
_finite \
_isnan \
_pclose \
_popen \
_snprintf \
......
......@@ -1939,6 +1939,8 @@ dnl **** Check for functions ****
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $BUILTINFLAG"
AC_CHECK_FUNCS(\
_finite \
_isnan \
_pclose \
_popen \
_snprintf \
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment