summaryrefslogtreecommitdiff
path: root/win32/win32.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-21 12:26:08 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-21 12:26:08 +0000
commit71e0bb92d13af4f8aabb79689a3a7edb81b6680a (patch)
tree1cb8b3a6f9623e1714715ac5986c6ac339830f3f /win32/win32.h
parent3819849ac195b9034e0cb9f6101978adfc18b6f0 (diff)
* numeric.c (flo_is_finite_p): use finite() if available.
* win32/win32.h (isinf, isnan): define as macro. [ruby-win32:00533] * bcc32/Makefile.sub, win32/Makefile.sub: no longer use missing/isinf.c, missing/isnan.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 b378fb23cd..48d2f1beaf 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__