From 3ea2258ce9e50247a89e93a76e3b4b1aeb4a54df Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Mon, 25 May 2020 00:07:07 +0200 Subject: xxx: isnanf() is some wtf --- gtk/fallback-c89.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gtk/fallback-c89.c b/gtk/fallback-c89.c index a566e3423a..505d52e13a 100644 --- a/gtk/fallback-c89.c +++ b/gtk/fallback-c89.c @@ -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 -- cgit v1.2.1