summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorforsyth <forsyth@vitanuova.com>2012-01-03 21:08:02 +0000
committerforsyth <forsyth@vitanuova.com>2012-01-03 21:08:02 +0000
commitcd03a2dc3bfa8e793b2e4702966706c10d69b314 (patch)
tree5f08b409b6137c3a57f739f816efb10176269b66
parent70847ce7c3d2ee9800014eb328f362b8e335ac76 (diff)
20120103-2107
-rw-r--r--CHANGES2
-rw-r--r--DragonFly/386/include/lib9.h10
-rw-r--r--FreeBSD/386/include/lib9.h10
-rw-r--r--MacOSX/386/include/lib9.h10
-rw-r--r--MacOSX/power/include/lib9.h10
-rw-r--r--NetBSD/386/include/lib9.h10
-rw-r--r--OpenBSD/386/include/lib9.h10
-rw-r--r--include/version.h2
-rw-r--r--lib9/isnan-posix.c15
-rw-r--r--lib9/mkfile-Nt1
-rw-r--r--lib9/mkfile-Posix1
-rw-r--r--libinterp/math.c2
-rw-r--r--libmath/mkfile1
-rw-r--r--limbo/nodes.c2
14 files changed, 76 insertions, 10 deletions
diff --git a/CHANGES b/CHANGES
index 32bc1829..d8c51e46 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,5 @@
+20120103
+ avoid re-defining isnan; use isNaN instead
20111231
Linux/*/include/emu.h adjustments for USE_PTHREADS for non-x86 processors
20111221
diff --git a/DragonFly/386/include/lib9.h b/DragonFly/386/include/lib9.h
index 19cffeef..c36541e5 100644
--- a/DragonFly/386/include/lib9.h
+++ b/DragonFly/386/include/lib9.h
@@ -20,7 +20,6 @@
#define getwd infgetwd
-#undef isnan
#define round infround
#define fmax inffmax
#define log2 inflog2
@@ -49,6 +48,15 @@ typedef unsigned short u16int;
typedef unsigned char u8int;
typedef unsigned long uintptr;
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+
#define USED(x) if(x){}else{}
#define SET(x)
diff --git a/FreeBSD/386/include/lib9.h b/FreeBSD/386/include/lib9.h
index e17701ac..b78c1eb7 100644
--- a/FreeBSD/386/include/lib9.h
+++ b/FreeBSD/386/include/lib9.h
@@ -20,7 +20,6 @@
#define getwd infgetwd
-#undef isnan
#define round infround
#define fmax inffmax
#define log2 inflog2
@@ -50,6 +49,15 @@ typedef unsigned short u16int;
typedef unsigned char u8int;
typedef unsigned long uintptr;
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+
#define USED(x) if(x){}else{}
#define SET(x)
diff --git a/MacOSX/386/include/lib9.h b/MacOSX/386/include/lib9.h
index 2d04266b..4716eea0 100644
--- a/MacOSX/386/include/lib9.h
+++ b/MacOSX/386/include/lib9.h
@@ -43,6 +43,15 @@ typedef unsigned short u16int;
typedef unsigned char u8int;
typedef unsigned long uintptr;
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+
/* handle conflicts with host os libs */
#define getwd infgetwd
#define scalb infscalb
@@ -50,7 +59,6 @@ typedef unsigned long uintptr;
#define panic infpanic
#define rint infrint
#define rcmd infrcmd
-#undef isnan
#define pow10 infpow10
#ifndef EMU
diff --git a/MacOSX/power/include/lib9.h b/MacOSX/power/include/lib9.h
index 0c1ed055..ff396e78 100644
--- a/MacOSX/power/include/lib9.h
+++ b/MacOSX/power/include/lib9.h
@@ -43,6 +43,15 @@ typedef unsigned short u16int;
typedef unsigned char u8int;
typedef unsigned long uintptr;
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+
/* handle conflicts with host os libs */
#define getwd infgetwd
#define scalb infscalb
@@ -50,7 +59,6 @@ typedef unsigned long uintptr;
#define panic infpanic
#define rint infrint
#define rcmd infrcmd
-#undef isnan
#define pow10 infpow10
#ifndef EMU
diff --git a/NetBSD/386/include/lib9.h b/NetBSD/386/include/lib9.h
index b2884de5..168af335 100644
--- a/NetBSD/386/include/lib9.h
+++ b/NetBSD/386/include/lib9.h
@@ -15,7 +15,6 @@
#define getwd infgetwd
-#undef isnan
#define round infround
#define fmax inffmax
#define log2 inflog2
@@ -49,6 +48,15 @@ typedef uvlong u64int;
typedef uintptr_t uintptr;
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+
typedef unsigned short Rune;
typedef unsigned int mpdigit; /* for /sys/include/mp.h */
diff --git a/OpenBSD/386/include/lib9.h b/OpenBSD/386/include/lib9.h
index 050fa070..66856f03 100644
--- a/OpenBSD/386/include/lib9.h
+++ b/OpenBSD/386/include/lib9.h
@@ -20,7 +20,6 @@
#define getwd infgetwd
-#undef isnan
#define round infround
#define fmax inffmax
#define log2 inflog2
@@ -50,6 +49,15 @@ typedef unsigned short u16int;
typedef unsigned char u8int;
typedef unsigned long uintptr;
+typedef signed char int8;
+typedef unsigned char uint8;
+typedef short int16;
+typedef unsigned short uint16;
+typedef int int32;
+typedef unsigned int uint32;
+typedef long long int64;
+typedef unsigned long long uint64;
+
#define USED(x) if(x){}else{}
#define SET(x)
diff --git a/include/version.h b/include/version.h
index fc63651e..4025c196 100644
--- a/include/version.h
+++ b/include/version.h
@@ -1 +1 @@
-#define VERSION "Fourth Edition (20111231)"
+#define VERSION "Fourth Edition (20120103)"
diff --git a/lib9/isnan-posix.c b/lib9/isnan-posix.c
new file mode 100644
index 00000000..ece5c0d8
--- /dev/null
+++ b/lib9/isnan-posix.c
@@ -0,0 +1,15 @@
+#include <lib9.h>
+
+int
+isNaN(double d)
+{
+ return isnan(d);
+}
+
+int
+isInf(double d, int sign)
+{
+ if(sign < 0)
+ return isinf(d) < 0;
+ return isinf(d);
+}
diff --git a/lib9/mkfile-Nt b/lib9/mkfile-Nt
index f264c479..3bb2a380 100644
--- a/lib9/mkfile-Nt
+++ b/lib9/mkfile-Nt
@@ -7,3 +7,4 @@ TARGFILES=\
setbinmode-Nt.$O\
lock-Nt-386.$O\
pread-Nt.$O\
+ isnan-posix.$O\
diff --git a/lib9/mkfile-Posix b/lib9/mkfile-Posix
index 085c665b..7f833067 100644
--- a/lib9/mkfile-Posix
+++ b/lib9/mkfile-Posix
@@ -6,3 +6,4 @@ TARGFILES=\
getcallerpc-$SYSTARG-$OBJTYPE.$O\
getwd-posix.$O\
sbrk-posix.$O\
+ isnan-posix.$O\
diff --git a/libinterp/math.c b/libinterp/math.c
index 85b2d69e..cae8dc4e 100644
--- a/libinterp/math.c
+++ b/libinterp/math.c
@@ -274,7 +274,7 @@ Math_isnan(void *fp)
f = fp;
- *f->ret = isnan(f->x);
+ *f->ret = isNaN(f->x);
}
void
diff --git a/libmath/mkfile b/libmath/mkfile
index 5c668951..82c7baab 100644
--- a/libmath/mkfile
+++ b/libmath/mkfile
@@ -48,7 +48,6 @@ OFILES=\
s_finite.$O\
s_floor.$O\
s_ilogb.$O\
- s_isnan.$O\
s_log1p.$O\
s_nextafter.$O\
s_rint.$O\
diff --git a/limbo/nodes.c b/limbo/nodes.c
index 920458d3..27ca7790 100644
--- a/limbo/nodes.c
+++ b/limbo/nodes.c
@@ -1045,7 +1045,7 @@ foldr(Node *n)
n->left = nil;
n->right = nil;
- if(isnan(rv))
+ if(isNaN(rv))
rv = canonnan;
n->rval = rv;