summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub8
-rw-r--r--win32/win32.h30
2 files changed, 14 insertions, 24 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index c358e3b93d..b38087f979 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -93,7 +93,7 @@ RFLAGS = -r
EXTLIBS =
!endif
LIBS = oldnames.lib user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
-MISSING = acosh.obj crypt.obj win32.obj isinf.obj isnan.obj
+MISSING = acosh.obj crypt.obj win32.obj
ARFLAGS = -machine:$(MACHINE) -out:
CC = $(CC) -nologo
@@ -245,6 +245,8 @@ config.h:
#define HAVE_STRTOUL 1
#define HAVE_FLOCK 1
#define HAVE_VSNPRINTF 1
+#define HAVE_ISINF 1
+#define HAVE_ISNAN 1
#define HAVE_FINITE 1
#define HAVE_FMOD 1
#define HAVE_FREXP 1
@@ -328,7 +330,7 @@ s,@AR@,$(AR),;t t
s,@ARFLAGS@,$(ARFLAGS),;t t
s,@LN_S@,$(LN_S),;t t
s,@SET_MAKE@,$(SET_MAKE),;t t
-s,@LIBOBJS@, acosh.obj crypt.obj win32.obj isinf.obj isnan.obj,;t t
+s,@LIBOBJS@, acosh.obj crypt.obj win32.obj,;t t
s,@ALLOCA@,$(ALLOCA),;t t
s,@DEFAULT_KCODE@,$(DEFAULT_KCODE),;t t
s,@EXEEXT@,.exe,;t t
@@ -516,8 +518,6 @@ crypt.obj: {$(srcdir)}missing/crypt.c
dup2.obj: {$(srcdir)}missing/dup2.c
finite.obj: {$(srcdir)}missing/finite.c
flock.obj: {$(srcdir)}missing/flock.c
-isinf.obj: {$(srcdir)}missing/isinf.c
-isnan.obj: {$(srcdir)}missing/isnan.c
memcmp.obj: {$(srcdir)}missing/memcmp.c
memmove.obj: {$(srcdir)}missing/memmove.c
mkdir.obj: {$(srcdir)}missing/mkdir.c
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__