$ use64bitall = "n"
$ use64bitint = "n"
$ uselongdouble = "n"
-$ uselargefiles = "n"
+$ uselargefiles = "y"
$ usestdstat = "n"
$ usesitecustomize = "n"
$ C_Compiler_Replace = "CC="
$ ENDIF !(needman .EQS. "true")
$!
$!: see if sh knows # comments !sfn
-$ sharpbang = "$ "
$!: figure out how to guarantee sh startup !sfn
$!: find out where common programs are !sfn
$!loclist="awk/cat/comm/cp/echo/expr/find/grep/ln/ls/mkdir/rm/sed/sort/touch/tr/uniq"
$ be_case_sensitive = ans
$! IEEE math?
$ echo ""
-$ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers"
-$ echo "internally on Alpha, but if you need G_FLOAT for binary compatibility"
+$ echo "Perl normally uses IEEE format (T_FLOAT) floating point numbers on"
+$ echo "Alpha and Itanium, but if you need G_FLOAT for binary compatibility"
$ echo "with an external library or existing data, you may wish to disable"
$ echo "the IEEE math option."
$ bool_dflt = use_ieee_math
$ IF use_ieee_math
$ THEN
$ extra_flags = "''extra_flags'" + "/float=ieee/ieee=denorm"
+$ ELSE
+$ IF (archname.EQS."VMS_IA64")
+$ THEN
+$ extra_flags = "''extra_flags'" + "/float=g_float"
+$ ENDIF
$ ENDIF
$ IF be_case_sensitive
$ THEN
$!
$ perllibs=libs
$!
-$! Are we 64 bit?
$!
-$ IF use64bitint .OR. use64bitint .EQS. "define"
+$ IF archname .NES. "VMS_VAX"
$ THEN
$ d_PRId64 = "define"
$ d_PRIu64 = "define"
$ d_quad = "define"
$ quadtype = "long long"
$ uquadtype = "unsigned long long"
-$ quadkind = "QUAD_IS_LONG_LONG"
+$ quadkind = "3"
+$!
+$ d_frexpl = "define"
+$ d_modfl = "define"
+$ d_modflproto = "define"
$ ELSE
$ d_PRId64 = "undef"
$ d_PRIXU64 = "undef"
$ sPRIu64 = ""
$ sPRIx64 = ""
$ d_quad = "undef"
-$ quadtype = "long"
-$ uquadtype = "unsigned long"
-$ quadkind = "QUAD_IS_LONG"
-$ ENDIF
+$ quadtype = "undef"
+$ uquadtype = "undef"
+$ quadkind = "undef"
$!
-$ IF archname .NES. "VMS_VAX"
-$ THEN
-$ d_frexpl = "define"
-$ d_modfl = "define"
-$ d_modflproto = "define"
-$ ELSE
$ d_frexpl = "undef"
$ d_modfl = "undef"
$ d_modflproto = "undef"
$!
$ IF uselargefiles .OR. uselargefiles .eqs. "define"
$ THEN
-$ echo4 "Largefile support enabled (plus standard stat support on V8.2 and later)"
-$ usestdstat = "y"
$ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
$ THEN
+$ echo4 "Largefile support enabled, so enabling standard stat support too."
+$ usestdstat = "y"
$ echo4 -
"Looking for the realpath() function to indicate symbolic link support..."
$ OS
$ nv_preserves_uv_bits = tmp
$ ENDIF
$!
+$ nv_overflows_integers_at = "0"
+$ echo4 "Checking to find the largest integer value your NVs can hold..."
+$ OS
+$ WS "#include <stdio.h>"
+$ WS ""
+$ WS "typedef ''nvtype' NV;"
+$ WS ""
+$ WS "int"
+$ WS "main() {"
+$ WS " NV value = 2;"
+$ WS " int count = 1;"
+$ WS ""
+$ WS " while(count < 256) {"
+$ WS " volatile NV up = value + 1.0;"
+$ WS " volatile NV negated = -value;"
+$ WS " volatile NV down = negated - 1.0;"
+$ WS " volatile NV got_up = up - value;"
+$ WS " int up_good = got_up == 1.0;"
+$ WS " int got_down = down - negated;"
+$ WS " int down_good = got_down == -1.0;"
+$ WS ""
+$ WS " if (down_good != up_good) {"
+$ WS " fprintf(stderr,"
+$ WS " ""Inconsistency - up %d %f; down %d %f; for 2**%d (%.20f)\n"","
+$ WS " up_good, (double) got_up, down_good, (double) got_down,"
+$ WS " count, (double) value);"
+$ WS " return 1;"
+$ WS " }"
+$ WS " if (!up_good) {"
+$ WS " while (1) {"
+$ WS " if (count > 8) {"
+$ WS " count -= 8;"
+$ WS " fputs(""256.0"", stdout);"
+$ WS " } else {"
+$ WS " count--;"
+$ WS " fputs(""2.0"", stdout);"
+$ WS " }"
+$ WS " if (!count) {"
+$ WS " puts("""");"
+$ WS " return 0;"
+$ WS " }"
+$ WS " fputs(""*"", stdout);"
+$ WS " }"
+$ WS " }"
+$ WS " value *= 2;"
+$ WS " ++count;"
+$ WS " }"
+$ WS " fprintf(stderr, ""Cannot overflow integer range, even at 2**%d (%.20f)\n"","
+$ WS " count, (double) value);"
+$ WS " return 1;"
+$ WS "}"
+$ CS
+$ GOSUB compile
+$ IF F$LENGTH(tmp) .GT. 0
+$ THEN
+$ IF F$EXTRACT(0,1,tmp) .EQS. "2"
+$ THEN
+$ echo "The largest integer your NVs can preserve is equal to ''tmp'"
+$ nv_overflows_integers_at = tmp
+$ ELSE
+$ echo "Cannot determine the largest integer value your NVs can hold, unexpected output"
+$ echo "''tmp'"
+$ ENDIF
+$ ELSE
+$ echo "Cannot determine the largest integer value your NVs can hold"
+$ ENDIF
+$!
$! Check for signbit (must already know nvtype)
$!
$ echo4 "Checking to see if you have signbit() available to work on ''nvtype'..."
$ WC "d_nice='define'"
$ WC "d_nl_langinfo='" + d_nl_langinfo + "'"
$ WC "d_nv_preserves_uv='" + d_nv_preserves_uv + "'"
+$ WC "nv_overflows_integers_at='" + nv_overflows_integers_at + "'"
$ WC "nv_preserves_uv_bits='" + nv_preserves_uv_bits + "'"
$ WC "d_nv_zero_is_allbits_zero='define'"
$ WC "d_off64_t='" + d_off64_t + "'"
$ WC "dlsrc='dl_vms.c'"
$ WC "doublesize='" + doublesize + "'"
$ WC "drand01='" + drand01 + "'"
+$ WC "dtrace='" + "'"
$!
$! The extensions symbol may be quite long
$!
$ WC "i8size='" + i8size + "'"
$ WC "i8type='" + i8type + "'"
$ WC "i_arpainet='undef'"
+$ WC "i_assert='define'"
$ WC "i_crypt='undef'"
$ WC "i_db='undef'"
$ WC "i_dbm='undef'"
$ WC "selectminbits='32'"
$ WC "selecttype='" + selecttype + "'"
$ WC "sh='MCR'"
+$ WC "sharpbang='#!'"
$ WC "shmattype='" + " '"
$ WC "shortsize='" + shortsize + "'"
$ IF (f$length(sig_name) .GE. 244)
$ WC "usedefaulttypes='" + usedefaulttypes + "'" ! VMS-specific
$ WC "usecrosscompile='undef'"
$ WC "usedl='" + usedl + "'"
+$ WC "usedtrace='undef'"
$ WC "usefaststdio='" + usefaststdio + "'"
$ WC "useieee='" + useieee + "'" ! VMS-specific
$ WC "useithreads='" + useithreads + "'"
$! Okay, we've gotten here. Build munchconfig.exe
$ COPY/NOLOG [-.vms]munchconfig.c []
$ COPY/NOLOG [-.vms]'Makefile_SH' []
-$ 'Perl_CC' munchconfig.c
+$ 'Perl_CC' 'ccflags' munchconfig.c
$ IF Needs_Opt
$ THEN
$ OPEN/WRITE CONFIG []munchconfig.opt
$ Goto next_ext
$ done:
$ sts = $Status
-$ Set Def &def
+$ Set Def &mydefault
$ Exit sts
$!-- make_ext.com
$EndOfTpl$