+case "$_DEC_cc_style.$useshrplib" in
+ new.) useshrplib="$define" ;;
+esac
+
+# The EFF_ONLY_OK from <sys/access.h> is present but dysfunctional for
+# [RWX]_OK as of Digital UNIX 4.0[A-D]?. If and when this gets fixed,
+# please adjust this appropriately. See also pp_sys.c just before the
+# emulate_eaccess().
+
+# Fixed in V5.0A.
+case "$myosvers" in
+*5.0[A-Z]*|*5.[1-9]*|*[6-9].[0-9]*)
+ : ok
+ ;;
+*)
+# V5.0 or previous
+pp_sys_cflags='ccflags="$ccflags -DNO_EFF_ONLY_OK"'
+ ;;
+esac
+
+# The off_t is already 8 bytes, so we do have largefileness.
+
+cat > UU/usethreads.cbu <<'EOCBU'
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+case "$usethreads" in
+$define|true|[yY]*)
+ # In Tru64 V5 (at least V5.1A, V5.1B) gcc (at least 3.2.2)
+ # cannot be used to compile a threaded Perl.
+ cat > pthread.c <<EOF
+#include <pthread.h>
+extern int foo;
+EOF
+ $cc -c pthread.c 2> pthread.err
+ if egrep -q "unrecognized compiler|syntax error" pthread.err; then
+ cat >&4 <<EOF
+***
+*** I'm sorry but your C compiler ($cc) cannot be used to
+*** compile Perl with threads. The system C compiler should work.
+***
+
+Cannot continue, aborting.
+
+EOF
+ rm -f pthread.*
+ exit 1
+ fi
+ rm -f pthread.*
+ # Threads interfaces changed with V4.0.
+ case "$isgcc" in
+ gcc)
+ ccflags="-D_REENTRANT $ccflags"
+ ;;
+ *) case "$unamer" in
+ *[123].*) ccflags="-threads $ccflags" ;;
+ *) ccflags="-pthread $ccflags" ;;
+ esac
+ ;;
+ esac
+ case "$unamer" in
+ *[123].*) libswanted="$libswanted pthreads mach exc c_r" ;;
+ *) libswanted="$libswanted pthread exc" ;;
+ esac
+
+ case "$usemymalloc" in
+ '')
+ usemymalloc='n'
+ ;;
+ esac
+ # These symbols are renamed in <time.h> so
+ # that the Configure hasproto doesn't see them.
+ d_asctime_r_proto="$define"
+ d_ctime_r_proto="$define"
+ d_gmtime_r_proto="$define"
+ d_localtime_r_proto="$define"
+ ;;
+esac
+EOCBU
+
+# malloc wrap works
+case "$usemallocwrap" in
+'') usemallocwrap='define' ;;
+esac
+
+cat > UU/uselongdouble.cbu <<'EOCBU'
+# This script UU/uselongdouble.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use long doubles.
+case "$uselongdouble" in
+$define|true|[yY]*)
+ case "$myosvers" in
+ *[1-4].0*) cat >&4 <<EOF
+
+***
+*** Sorry, you cannot use long doubles in pre-V5.0 releases of Tru64.
+***
+
+Cannot continue, aborting.
+
+EOF
+ exit 1
+ ;;
+ *)
+ # Test whether libc's been fixed yet for long doubles.
+ 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 $_ccflags_strict_ansi 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
+EOCBU
+
+case "$myosvers" in
+*[1-4].0*) d_modfl=undef ;; # must wait till 5.0
+esac
+
+# Keep that leading tab.
+ old_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+for p in $loclibpth
+do
+ if test -d $p; then
+ echo "Appending $p to LD_LIBRARY_PATH." >& 4
+ case "$LD_LIBRARY_PATH" in
+ '') LD_LIBRARY_PATH=$p ;;
+ *) LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$p ;;
+ esac
+ fi
+done
+case "$LD_LIBRARY_PATH" in
+"$old_LD_LIBRARY_PATH") ;;
+*) echo "LD_LIBRARY_PATH is now $LD_LIBRARY_PATH." >& 4 ;;
+esac
+case "$LD_LIBRARY_PATH" in
+'') ;;
+* ) export LD_LIBRARY_PATH ;;
+esac
+
+# Enforce strict data.
+case "$isgcc" in
+gcc) ;;
+*) # -trapuv poisons uninitialized stack with
+ # 0xfff58005fff58005 which is as a pointer a segmentation fault and
+ # as a floating point a signaling NaN. As integers/longs that causes
+ # no traps but at least it is not zero.
+ # -readonly_strings moves string constants into read-only section
+ # which hopefully means that modifying them leads into segmentation
+ # faults.
+ #
+ for i in -trapuv -readonly_strings
+ do
+ case "$ccflags" in
+ *$i*) ;;
+ *) ccflags="$ccflags $i" ;;
+ esac
+ done
+ ;;
+esac