[PATCH 3/7] sim: sh: fix isnan redefinition with mingw targets

Mike Frysinger vapier@gentoo.org
Sun Nov 7 01:12:12 GMT 2021


The code assumes that all _WIN32 targets are the same and can
define isnan to _isnan.  For mingw targets, they provide an isnan
define already, so no need for the fallback here.
---
 sim/sh/interp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 2bae4484e349..c4ac5b3e66b1 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -65,8 +65,10 @@
 
 #ifdef _WIN32
 #include <float.h>		/* Needed for _isnan() */
+#ifndef isnan
 #define isnan _isnan
 #endif
+#endif
 
 #ifndef SIGBUS
 #define SIGBUS SIGSEGV
-- 
2.33.0



More information about the Gdb-patches mailing list