[PATCH 2/4] includes: Newer Visual Studio versions have isfinite and friends.

Stefan Dösinger stefan at codeweavers.com
Sun Nov 17 06:43:13 CST 2019


Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>

---

And luckily they are macros, so we can detect it with #ifdefs.
---
 include/wine/port.h | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/include/wine/port.h b/include/wine/port.h
index d23e2b033f1..b3ef4b905a9 100644
--- a/include/wine/port.h
+++ b/include/wine/port.h
@@ -58,9 +58,15 @@
 #ifdef _MSC_VER
 
 #define ftruncate chsize
-#define isfinite(x) _finite(x)
-#define isinf(x) (!(_finite(x) || _isnan(x)))
-#define isnan(x) _isnan(x)
+#ifndef isfinite
+# define isfinite(x) _finite(x)
+#endif
+#ifndef isinf
+# define isinf(x) (!(_finite(x) || _isnan(x)))
+#endif
+#ifndef isnan
+# define isnan(x) _isnan(x)
+#endif
 #define popen _popen
 #define pclose _pclose
 #define snprintf _snprintf
-- 
2.23.0




More information about the wine-devel mailing list