[gtk/wip/otte/listview] xxx: isnanf() is some wtf



commit 139d0d2999ed04b800b9fe335a1e0df6d2d8f1e8
Author: Benjamin Otte <otte redhat com>
Date:   Mon May 25 00:07:07 2020 +0200

    xxx: isnanf() is some wtf

 gtk/fallback-c89.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/gtk/fallback-c89.c b/gtk/fallback-c89.c
index a566e3423a..3515cfe626 100644
--- a/gtk/fallback-c89.c
+++ b/gtk/fallback-c89.c
@@ -97,11 +97,19 @@ isnan (double x)
  * 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 (x);
+#endif
 #endif
 
 #ifndef INFINITY


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]