summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpider Boardman <spider@orb.nashua.nh.us>2002-03-18 05:09:50 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-18 14:14:17 +0000
commitfa17d1125252c7692b77f5cec3a606914a30cb20 (patch)
treeea288718dfbcdafde4156d1060487b0a251fc125
parent083fcd59cab1a76269852c22b8b181ad12d6cfe9 (diff)
downloadperl-fa17d1125252c7692b77f5cec3a606914a30cb20.tar.gz
re: long double vs. Tru64 UNIX
Message-Id: <200203181509.KAA419788@leggy.zk3.dec.com> p4raw-id: //depot/perl@15293
-rw-r--r--README.tru648
-rw-r--r--hints/dec_osf.sh35
2 files changed, 43 insertions, 0 deletions
diff --git a/README.tru64 b/README.tru64
index d65175a4c0..ce2181a4ef 100644
--- a/README.tru64
+++ b/README.tru64
@@ -48,6 +48,14 @@ You cannot Configure Perl to use long doubles unless you have at least
Tru64 V5.0, the long double support simply wasn't functional before
that.
+At the time of this writing, there's a bug in the Tru64 libc printing
+of long doubles when not using "e" notation. The values are correct
+and usable, but you only get a limited number of digits displayed
+unless you force the issue by using C<printf "%.33e",$num> or the like.
+For Tru64 versions V5.0A through V5.1A, a patch is expected sometime after
+perl 5.8.0 is released. If your libc has not yet been patched, you'll get
+a warning from Configure when selecting long doubles.
+
=head2 64-bit Perl on Tru64
In Tru64 Perl's integers are automatically 64-bit wide, there is
diff --git a/hints/dec_osf.sh b/hints/dec_osf.sh
index dcaa2832ce..b30f218945 100644
--- a/hints/dec_osf.sh
+++ b/hints/dec_osf.sh
@@ -310,6 +310,41 @@ Cannot continue, aborting.
EOF
exit 1
;;
+ *)
+ # Test whether libc's been fixed yet.
+ cat >try.c <<\TRY
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+ unsigned long uvmax = ~0UL;
+ long double ld = uvmax + 0.0L;
+ char buf1[30], buf2[30];
+
+ (void) sprintf(buf1, "%lu", uvmax);
+ (void) sprintf(buf2, "%.0Lf", ld);
+ return strcmp(buf1, buf2) != 0;
+}
+TRY
+ # Don't bother trying to work with Configure's idea of
+ # cc and the various flags. This might not work as-is
+ # with gcc -- but we're testing libc, not the compiler.
+ if cc -o try -std try.c && ./try
+ then
+ : ok
+ else
+ cat <<\UGLY >&4
+!
+Warning! Your libc has not yet been patched so that its "%Lf" format for
+printing long doubles shows all the significant digits. You will get errors
+in the t/op/numconvert test because of this. (The data is still good
+internally, and the "%e" format of printf() or sprintf() in perl will still
+produce valid results.) See README.tru64 for additional details.
+
+Continuing anyway.
+!
+UGLY
+ fi
+ $rm -f try try.c
esac
;;
esac