This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
HP-UX 10.20 has pseudo-long-double which shouldn't be used.
authorJarkko Hietaniemi <jhi@iki.fi>
Fri, 28 Nov 2014 16:53:57 +0000 (11:53 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 29 Nov 2014 21:54:28 +0000 (16:54 -0500)
hints/hpux.sh

index 39150be..cb1895d 100644 (file)
@@ -213,6 +213,30 @@ case "$usemorebits" in
     $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
     esac
 
+# There is a weird pre-C99 long double (a struct of four uin32_t)
+# in HP-UX 10.20 but beyond strtold() there's no support for them
+# for example in <math.h>.
+case "$uselongdouble" in
+    $define|true|[yY]*)
+       if [ "$xxOsRevMajor" -lt 11 ]; then
+           cat <<EOM >&4
+
+*** uselongdouble (or usemorebits) is not supported on HP-UX $xxOsRevMajor.
+*** You need at least HP-UX 11.0.
+*** Cannot continue, aborting.
+EOM
+           exit 1
+       fi
+       ;;
+    esac
+
+# Configure long double scan will detect the HP-UX 10.20 "long double"
+# (a struct of four uin32_t) and think it is IEEE quad.  Make it not so.
+if [ "$xxOsRevMajor" -lt 11 ]; then
+    d_longdbl="$undef"
+    longdblsize=8 # Make it double.
+fi
+
 case "$archname" in
     IA64*)
        # While here, override so=sl auto-detection