xxx: isnanf() is some wtf

This commit is contained in:
Benjamin Otte 2020-05-25 00:07:07 +02:00 committed by Matthias Clasen
parent c7feae65f1
commit 3ea2258ce9

View File

@ -93,15 +93,27 @@ isnan (double x)
#endif
#ifndef HAVE_DECL_ISNANF
#if 1
#define isnanf(x) isnan(x)
#else
/* it seems of the supported compilers only
* MSVC does not have isnanf(), but it does
* have _isnanf() which does the same as isnanf()
*/
#ifdef _MSC_VER
static inline gboolean
isnanf (float x)
{
return _isnanf (x);
}
#elif defined (__GNUC__)
/* gcc has an intern function that it warns about when
* using -Wshadow but no header properly declares it,
* so we do it instead.
*/
extern int isnanf (float x);
#endif
#endif
#endif
#ifndef INFINITY