diff options
author | Spider Boardman <spider@orb.nashua.nh.us> | 2002-03-18 05:09:50 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-03-18 14:14:17 +0000 |
commit | fa17d1125252c7692b77f5cec3a606914a30cb20 (patch) | |
tree | ea288718dfbcdafde4156d1060487b0a251fc125 /hints | |
parent | 083fcd59cab1a76269852c22b8b181ad12d6cfe9 (diff) | |
download | perl-fa17d1125252c7692b77f5cec3a606914a30cb20.tar.gz |
re: long double vs. Tru64 UNIX
Message-Id: <200203181509.KAA419788@leggy.zk3.dec.com>
p4raw-id: //depot/perl@15293
Diffstat (limited to 'hints')
-rw-r--r-- | hints/dec_osf.sh | 35 |
1 files changed, 35 insertions, 0 deletions
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 |