# New Ticket Created by  Andy Dougherty 
# Please include the string:  [perl #28170]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=28170 >

ALl of the big-endian tinderboxes are currently failing t/pmc/perlnum.t
test 36 (the one that tries to handle negative zero).  (The two Solaris
tinderboxes are still running a very old version of parrot that's
irrelevant.)

This patch makes the current non-portable test slightly less non-portable.
Better, of course, would be to have Configure.pl look for and use
signbit() if it's available.  (On Solaris, for example, you'd need to
include <sunmath.h> and link against -lsunmath.)

diff -ru parrot-current/config/gen/platform/generic/math.c 
parrot-andy/config/gen/platform/generic/math.c
--- parrot-current/config/gen/platform/generic/math.c   Fri Mar 19 10:30:10 2004
+++ parrot-andy/config/gen/platform/generic/math.c      Thu Apr  1 17:22:14 2004
@@ -13,7 +13,11 @@
        int i[2];
    } u;
    u.d = x;
+#if PARROT_BIGENDIAN
+   return u.i[0] < 0;
+#else
    return u.i[1] < 0;
+#endif
 }

 #if NUMVAL_SIZE == 12

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to