[gtk/isnanf-cleanup] wip



commit 84403be18ab6a5095c16246f734cbc7f54d4124e
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sun May 31 15:09:31 2020 +0200

    wip

 gtk/fallback-c89.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)
---
diff --git a/gtk/fallback-c89.c b/gtk/fallback-c89.c
index 505d52e13a..8950924b6a 100644
--- a/gtk/fallback-c89.c
+++ b/gtk/fallback-c89.c
@@ -20,6 +20,7 @@
 #include "config.h"
 
 #include <math.h>
+#include <float.h>
 
 /* Workaround for round() for non-GCC/non-C99 compilers */
 #ifndef HAVE_ROUND
@@ -93,27 +94,12 @@ 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);
+  /* Either use the C99 type infering macro, or the fallback from above */
+  return isnan (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


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