port: Add isinf and isnan implementations for Visual Studio.

This commit is contained in:
Stefan Dösinger 2011-05-24 21:05:28 +02:00 committed by Alexandre Julliard
parent cf757a6361
commit a774152f1a
5 changed files with 26 additions and 0 deletions

2
configure vendored
View File

@ -12803,6 +12803,8 @@ esac
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $BUILTINFLAG"
for ac_func in \
_finite \
_isnan \
_pclose \
_popen \
_snprintf \

View File

@ -1939,6 +1939,8 @@ dnl **** Check for functions ****
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $BUILTINFLAG"
AC_CHECK_FUNCS(\
_finite \
_isnan \
_pclose \
_popen \
_snprintf \

View File

@ -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

View File

@ -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

View File

@ -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