summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-05-02 20:12:45 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-02 20:12:45 +0000
commit206010116263d61868593b09468f8d6d204ba3ac (patch)
treef118ab7327a54f7b1e169f350d68aebd2249facb /perl.h
parenta69a6dba78e6feba230971324444d5b3e5cc9bda (diff)
downloadperl-206010116263d61868593b09468f8d6d204ba3ac.tar.gz
Workaround for UTS compiler casting bug from Hal Morris.
p4raw-id: //depot/perl@9967
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 9e49913d17..83daa4d224 100644
--- a/perl.h
+++ b/perl.h
@@ -1086,6 +1086,25 @@ typedef UVTYPE UV;
# endif
#endif
+/*
+ I've tracked down a weird bug in Perl5.6.1 to the UTS compiler's
+ mishandling of MY_UV_MAX in util.c. It is defined as
+ #ifndef MY_UV_MAX
+ # define MY_UV_MAX ((UV)IV_MAX * (UV)2 + (UV)1)
+ #endif
+ The compiler handles {double floating point value} >= MY_UV_MAX as if
+ MY_UV_MAX were the signed integer -1. In fact it will do the same
+ thing with (UV)(0xffffffff), in place of MY_UV_MAX, though 0xffffffff
+ *without* the typecast to UV works fine.
+
+ hom00@utsglobal.com (Hal Morris) 2001-05-02
+
+ */
+
+#ifdef UTS
+# define MY_UV_MAX 0xffffffff
+#endif
+
#define IV_DIG (BIT_DIGITS(IVSIZE * 8))
#define UV_DIG (BIT_DIGITS(UVSIZE * 8))