summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2020-05-25 00:07:07 +0200
committerMatthias Clasen <mclasen@redhat.com>2020-05-30 19:30:14 -0400
commit3ea2258ce9e50247a89e93a76e3b4b1aeb4a54df (patch)
treee88c691ef379adb08437021e9d1fecaefb0f98ec
parentc7feae65f17119f11236a0cd09bbd1505d87a123 (diff)
downloadgtk+-3ea2258ce9e50247a89e93a76e3b4b1aeb4a54df.tar.gz
xxx: isnanf() is some wtf
-rw-r--r--gtk/fallback-c89.c12
1 files changed, 12 insertions, 0 deletions
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