summaryrefslogtreecommitdiff
path: root/missing
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-15 07:59:59 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-15 07:59:59 +0000
commit86307f52ee1b3c5aa76e2fd6ee118e681dd76905 (patch)
tree4f5675ce901200d4245c6697d4e8d1c224949174 /missing
parente12510c502a3c8a81aeda66d1867eb1e760ce533 (diff)
990715
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing')
-rw-r--r--missing/isinf.c19
-rw-r--r--missing/isnan.c2
2 files changed, 19 insertions, 2 deletions
diff --git a/missing/isinf.c b/missing/isinf.c
index 3e1e410455..e0cd6ac1a2 100644
--- a/missing/isinf.c
+++ b/missing/isinf.c
@@ -1,3 +1,21 @@
+#ifdef __osf__
+
+#define _IEEE 1
+#include <nan.h>
+
+int
+isinf(n)
+ double n;
+{
+ if (IsNANorINF(n) && IsINF(n)) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+#else
+
#include "config.h"
#ifdef HAVE_STRING_H
# include <string.h>
@@ -23,3 +41,4 @@ isinf(n)
return memcmp(&n, &pinf, sizeof n) == 0
|| memcmp(&n, &ninf, sizeof n) == 0;
}
+#endif
diff --git a/missing/isnan.c b/missing/isnan.c
index 8b3bc2b57c..96bb93ba6a 100644
--- a/missing/isnan.c
+++ b/missing/isnan.c
@@ -14,5 +14,3 @@ double_ne(n1, n2)
{
return n1 != n2;
}
-
-