summaryrefslogtreecommitdiff
path: root/win32/win32.h
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.h')
-rw-r--r--win32/win32.h30
1 files changed, 10 insertions, 20 deletions
diff --git a/win32/win32.h b/win32/win32.h
index b378fb2..48d2f1b 100644
--- a/win32/win32.h
+++ b/win32/win32.h
@@ -175,40 +175,30 @@ extern int do_aspawn(int, char *, char **);
extern int kill(int, int);
extern pid_t rb_w32_getpid(void);
-#ifdef __BORLANDC__
#include <float.h>
+#if !defined __MINGW32__ || defined __NO_ISOCEXT
#ifndef isnan
-#define isnan _isnan
+#define isnan(x) _isnan(x)
#endif
-
-#ifdef S_ISDIR
-#undef S_ISDIR
+#ifndef isinf
+#define isinf(x) (!_finite(x) && !_isnan(x))
#endif
-
-#ifdef S_ISFIFO
-#undef S_ISFIFO
+#ifndef finite
+#define finite(x) _finite(x)
#endif
-
-#ifdef S_ISBLK
-#undef S_ISBLK
#endif
-#ifdef S_ISCHR
+#ifdef __BORLANDC__
+#undef S_ISDIR
+#undef S_ISFIFO
+#undef S_ISBLK
#undef S_ISCHR
-#endif
-
-#ifdef S_ISREG
#undef S_ISREG
-#endif
-
#define S_ISDIR(m) (((unsigned short)(m) & S_IFMT) == S_IFDIR)
#define S_ISFIFO(m) (((unsigned short)(m) & S_IFMT) == S_IFIFO)
#define S_ISBLK(m) (((unsigned short)(m) & S_IFMT) == S_IFBLK)
#define S_ISCHR(m) (((unsigned short)(m) & S_IFMT) == S_IFCHR)
#define S_ISREG(m) (((unsigned short)(m) & S_IFMT) == S_IFREG)
-#elif !defined __MINGW32__ || defined __NO_ISOCEXT
-extern int isinf(double);
-extern int isnan(double);
#endif
#if !defined S_IRUSR && !defined __MINGW32__