summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-02 20:00:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-02 20:00:37 +0000
commit1ad04cfd3b3b4bd1424debce624b00a1a8883189 (patch)
tree18d81effa8de09759298f7dd8b13c46d1b1da940 /pp.c
parentea6ddde26e93ac4e470613e4a73999c44dba71c7 (diff)
downloadperl-1ad04cfd3b3b4bd1424debce624b00a1a8883189.tar.gz
workaround for Tru64 compiler bug (cleaner fix will have
to wait until 5.6.1), from Spider Boardman p4raw-id: //depot/cfgperl@5448
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index d0a9959eba..ebfe985b29 100644
--- a/pp.c
+++ b/pp.c
@@ -1199,7 +1199,21 @@ PP(pp_ncmp)
{
dPOPTOPnnrl;
I32 value;
+#ifdef __osf__ /* XXX fix in 5.6.1 --jhi */
+#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+#define Perl_isnan isnanl
+#else
+#define Perl_isnan isnan
+#endif
+#endif
+#ifdef __osf__ /* XXX fix in 5.6.1 --jhi */
+ if (Perl_isnan(left) || Perl_isnan(right)) {
+ SETs(&PL_sv_undef);
+ RETURN;
+ }
+ value = (left > right) - (left < right);
+#else
if (left == right)
value = 0;
else if (left < right)
@@ -1210,6 +1224,7 @@ PP(pp_ncmp)
SETs(&PL_sv_undef);
RETURN;
}
+#endif
SETi(value);
RETURN;
}