This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Integrate mainline 5.05_61
[perl5.git] / vms / subconfigure.com
index 8333a6f..2c7b240 100644 (file)
@@ -1,4 +1,22 @@
 $! SUBCONFIGURE.COM - build a config.sh for VMS Perl.
+$!
+$! Note for folks from other platforms changing things in here:
+$!   Fancy changes (based on compiler capabilities or VMS version or
+$!   whatever) are tricky, so go ahead and punt on those.
+$!
+$!   Simple changes, though (say, always setting something to 1, or undef,
+$!   or something like that) are straightforward. Adding a new item for the
+$!   ultimately created config.sh requires adding two lines to this file.
+$!
+$!   First, a line in the format:
+$!     $ perl_foo = "bar"
+$!   after the line tagged ##ADD NEW CONSTANTS HERE##. Replace foo with the
+$!   variable name as it appears in config.sh.
+$!
+$!   Second, add a line in the format:
+$!     $ WC "foo='" + perl_foo + "'"
+$!   after the line tagged ##WRITE NEW CONSTANTS HERE##. Careful of the
+$!   quoting, as it can be tricky. 
 $! 
 $! This .COM file expects to be called by configure.com, and thus expects
 $! a few symbols in the environment. Notably:
@@ -12,6 +30,7 @@ $!  C_Compiler_Invoke is the command needed to invoke the C compiler
 $!
 $! Set Dec_C_Version to something
 $ WRITE_RESULT := "WRITE SYS$OUTPUT ""%CONFIG-I-RESULT "" + "
+$ echo = "Write Sys$Output "
 $ Dec_C_Version := "''Dec_C_Version'"
 $ Dec_C_Version = Dec_C_Version + 0
 $ Vms_Ver := "''f$extract(1,3, f$getsyi(""version""))'"
@@ -31,21 +50,111 @@ $ ELSE
 $   Checkcc := "''Mcc'"
 $ ENDIF
 $ cc_flags = ""
+$ if use_multiplicity .eqs. "Y"
+$ THEN
+$   perl_usemultiplicity = "define"
+$ ELSE
+$   perl_usemultiplicity = "undef"
+$ ENDIF
 $! Some constant defaults.
 $
 $ hwname = f$getsyi("HW_NAME")
 $ myname = myhostname
 $ if "''myname'" .eqs. "" THEN myname = f$trnlnm("SYS$NODE")
+$!
+$! ##ADD NEW CONSTANTS HERE##
+$ perl_d_madvise="undef"
+$ perl_selectminbits=32
+$ perl_d_msync="undef"
+$ perl_d_mprotect="undef"
+$ perl_d_munmap="undef"
+$ perl_crosscompile="undef"
+$ perl_multiarch="undef"
+$ perl_d_mmap="undef"
+$ perl_i_sysmman="undef"
+$ perl_d_telldirproto="define"
+$ perl_i_sysmount="undef"
+$ perl_d_bincompat="undef"
+$ perl_d_endspent="undef
+$ perl_d_getspent="undef
+$ perl_d_getspnam="undef
+$ perl_d_setspent="undef
+$ perl_d_fstatfs="undef"
+$ perl_i_machcthreads="undef"
+$ perl_i_pthread="define"
+$ perl_d_fstatvfs="undef"
+$ perl_usesocks="undef"
+$ perl_d_vendorlib="undef"
+$ perl_vendorlibexp=""
+$ perl_d_statfsflags="undef"
+$ perl_i_sysstatvfs="undef"
+$ perl_i_mntent="undef"
+$ perl_d_getmntent="undef"
+$ perl_d_hasmntopt="undef"
 $ perl_package="''package'"
 $ perl_baserev = "''baserev'"
 $ cc_defines=""
+$ perl_installusrbinperl="undef"
 $ perl_CONFIG="true"
+$ perl_d_fseeko="undef"
+$ perl_d_ftello="undef"
+$ perl_d_readv="undef"
+$ perl_d_writev="undef"
+$ perl_i_machcthr="undef"
 $ perl_i_netdb="undef"
 $ perl_d_gnulibc="undef"
 $ perl_cf_by="unknown"
 $ perl_ccdlflags=""
 $ perl_cccdlflags=""
 $ perl_mab=""
+$ perl_drand01 = "drand48()"
+$ perl_randseedtype = "long int"
+$ perl_seedfunc = "srand48"
+$ perl_d_msg_ctrunc = "undef"
+$ perl_d_msg_dontroute = "undef"
+$ perl_d_msg_oob = "undef"
+$ perl_d_msg_peek = "undef"
+$ perl_d_msg_proxy = "undef"
+$ perl_d_scm_rights = "undef"
+$ perl_d_sendmsg = "undef"
+$ perl_d_recvmsg = "undef"
+$ perl_d_msghdr_s = "undef"
+$ perl_d_cmsghdr_s = "undef"
+$ perl_d_dbminit64 = "undef"
+$ perl_d_dbmclose64 = "undef"
+$ perl_d_fetch64 = "undef"
+$ perl_d_store64 = "undef"
+$ perl_d_delete64 = "undef"
+$ perl_d_firstkey64 = "undef"
+$ perl_d_nextkey64 = "undef"
+$ perl_d_fstat64 = "undef"
+$ perl_d_ftruncate64 = "undef"
+$ perl_d_lseek64 = "undef"
+$ perl_d_lstat64 = "undef"
+$ perl_d_open64 = "undef"
+$ perl_d_opendir64 = "undef"
+$ perl_d_readdir64 = "undef"
+$ perl_d_seekdir64 = "undef"
+$ perl_d_stat64 = "undef"
+$ perl_d_telldir64 = "undef"
+$ perl_d_truncate64 = "undef"
+$ perl_d_dirent64_s = "undef"
+$ perl_d_fgetpos64 = "undef"
+$ perl_d_fopen64 = "undef"
+$ perl_d_freopen64 = "undef"
+$ perl_d_fseek64 = "undef"
+$ perl_d_fseeko64 = "undef"
+$ perl_d_fsetpos64 = "undef"
+$ perl_d_ftell64 = "undef"
+$ perl_d_ftello64 = "undef"
+$ perl_d_tmpfile64 = "undef"
+$ IF use_64bit .eqs. "Y"
+$ THEN
+$   perl_use64bits = "define"
+$ ELSE
+$   perl_use64bits = "undef"
+$ ENDIF
+$ perl_d_drand48proto = "define"
 $ perl_libpth="/sys$share /sys$library"
 $ perl_ld="Link"
 $ perl_lddlflags="/Share"
@@ -62,6 +171,10 @@ $ perl_d_pwpasswd="define"
 $ perl_d_setpwent="define"
 $ perl_d_getpwent="define"
 $ perl_d_endpwent="define"
+$ perl_d_phostname="undef"
+$ perl_d_accessx="undef"
+$ perl_d_eaccess="undef"
+$ perl_ebcdic="undef"
 $ perl_hintfile=""
 $ perl_shrplib="define"
 $ perl_usemymalloc=mymalloc
@@ -75,7 +188,7 @@ $ perl_prefix="perl_root"
 $ perl_binexp="''perl_prefix':[000000]"
 $ perl_builddir="''perl_prefix':[000000]"
 $ perl_installbin="''perl_prefix':[000000]"
-$ perl_installscript="''perl_prefix':[000000]"
+$ perl_installscript="''perl_prefix':[utils]"
 $ perl_installman1dir="''perl_prefix':[man.man1]"
 $ perl_installman3dir="''perl_prefix':[man.man3]"
 $ perl_installprivlib="''perl_prefix':[lib]"
@@ -109,14 +222,14 @@ $ perl_osname="VMS"
 $ perl_d_archlib="define"
 $ perl_d_bincompat3="undef"
 $ perl_cppstdin="''Perl_CC'/noobj/preprocess=sys$output sys$input"
-$ perl_cppminus=""
+$ perl_cppminus=" "
 $ perl_d_castneg="define"
 $ perl_castflags="0"
 $ perl_d_chsize="undef"
 $ perl_d_const="define"
 $ perl_d_crypt="define"
 $ perl_byteorder="1234"
-$ perl_full_csh=""
+$ perl_full_csh=" "
 $ perl_d_csh="undef"
 $ perl_d_dup2="define"
 $ perl_d_fchmod="undef"
@@ -270,9 +383,9 @@ $ENDIF
 $ perl_sh="MCR"
 $ perl_modetype="unsigned int"
 $ perl_ssizetype="int"
-$ perl_o_nonblock=""
-$ perl_eagain=""
-$ perl_rd_nodata=""
+$ perl_o_nonblock=" "
+$ perl_eagain=" "
+$ perl_rd_nodata=" "
 $ perl_d_eofnblk="undef"
 $ perl_d_oldarchlib="define"
 $ perl_privlibexp="''perl_prefix':[lib]"
@@ -305,8 +418,8 @@ $ perl_d_getpgrp2="undef"
 $ perl_d_sfio="undef"
 $ perl_usedl="define"
 $ perl_startperl="""$ perl 'f$env(\""procedure\"")' 'p1' 'p2' 'p3' 'p4' 'p5' 'p6' 'p7' 'p8'  !\n$ exit++ + ++$status != 0 and $exit = $status = undef;"""
-$ perl_db_hashtype=""
-$ perl_db_prefixtype=""
+$ perl_db_hashtype=" "
+$ perl_db_prefixtype=" "
 $ perl_useperlio="undef"
 $ perl_defvoidused="15"
 $ perl_voidflags="15"
@@ -316,18 +429,49 @@ $ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2")
 $ THEN
 $ perl_libs="SYS$SHARE:CMA$LIB_SHR.EXE/SHARE SYS$SHARE:CMA$RTL.EXE/SHARE SYS$SHARE:CMA$OPEN_LIB_SHR.exe/SHARE SYS$SHARE:CMA$OPEN_RTL.exe/SHARE"
 $ ELSE
-$ perl_libs=""
+$ perl_libs=" "
 $ ENDIF
 $ IF ("''Using_Dec_C'".eqs."Yes")
 $ THEN
 $ perl_libc="(DECCRTL)"
 $ ELSE
-$ perl_libc=""
+$ perl_libc=" "
 $ ENDIF
 $ perl_PATCHLEVEL="''patchlevel'"
 $ perl_SUBVERSION="''subversion'"
 $ perl_pager="most"
 $!
+$! Are we 64 bit?
+$!
+$ if (use_64bit .eqs. "Y")
+$ THEN
+$   perl_d_PRIfldbl = "define"
+$   perl_d_PRIgldbl = "define"
+$   perl_d_PRId64 = "define"
+$   perl_d_PRIu64 = "define"
+$   perl_d_PRIo64 = "define"
+$   perl_d_PRIx64 = "define"
+$   perl_sPRIfldbl = """Lf"""
+$   perl_sPRIgldbl = """Lg"""
+$   perl_sPRId64 = """Ld"""
+$   perl_sPRIu64 = """Lu"""
+$   perl_sPRIo64 = """Lo"""
+$   perl_sPRIx64 = """Lx"""
+$ ELSE
+$   perl_d_PRIfldbl = "undef"
+$   perl_d_PRIgldbl = "undef"
+$   perl_d_PRId64 = "undef"
+$   perl_d_PRIu64 = "undef"
+$   perl_d_PRIo64 = "undef"
+$   perl_d_PRIx64 = "undef"
+$   perl_sPRIfldbl = ""
+$   perl_sPRIgldbl = ""
+$   perl_sPRId64 = ""
+$   perl_sPRIu64 = ""
+$   perl_sPRIo64 = ""
+$   perl_sPRIx64 = ""
+$ ENDIF
+$!
 $!
 $! Now some that we build up
 $!
@@ -346,8 +490,23 @@ $ perl_arch="VMS_VAX"
 $ perl_archname="VMS_VAX"
 $ perl_alignbytes="8"
 $ ENDIF
+$ if ("''Use_Threads'".eqs."T")
+$ THEN
+$ perl_arch = "''perl_arch'-thread"
+$ perl_archname = "''perl_archname'-thread"
+$ perl_d_old_pthread_create_joinable = "undef"
+$ perl_old_pthread_create_joinable = " "
+$ ELSE
+$ perl_d_old_pthread_create_joinable = "undef"
+$ perl_old_pthread_create_joinable = " "
+$ ENDIF
 $ perl_osvers=f$edit(osvers, "TRIM")
+$ if (perl_subversion + 0).eq.0
+$ THEN
+$ LocalPerlVer = "5_" + Perl_PATCHLEVEL
+$ ELSE
 $ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion
+$ ENDIF
 $!
 $! Some that we need to invoke the compiler for
 $ OS := "open/write SOURCECHAN []temp.c"
@@ -388,12 +547,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   ON ERROR THEN CONTINUE
 $   ON WARNING THEN CONTINUE
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
@@ -430,14 +589,14 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   ON ERROR THEN CONTINUE
 $   ON WARNING THEN CONTINUE
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
-$!   link temp
+$!   link temp.obj
 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
@@ -471,7 +630,7 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   ON ERROR THEN CONTINUE
 $   ON WARNING THEN CONTINUE
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   teststatus = f$extract(9,1,$status)
 $   if (teststatus.nes."1")
 $   THEN
@@ -482,9 +641,9 @@ $     ON ERROR THEN CONTINUE
 $     ON WARNING THEN CONTINUE
 $     If (Needs_Opt.eqs."Yes")
 $     THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $     else
-$       link temp
+$       link temp.obj
 $     endif
 $     teststatus = f$extract(9,1,$status)
 $     DEASSIGN SYS$OUTPUT
@@ -529,12 +688,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -578,18 +737,18 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
 $   DEASSIGN SYS$OUTPUT
@@ -624,12 +783,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
 $   DEASSIGN SYS$OUTPUT
@@ -666,12 +825,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
 $   DEASSIGN SYS$OUTPUT
@@ -708,7 +867,7 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
@@ -740,7 +899,7 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
@@ -769,44 +928,867 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$!   Okay, failed. Must not have it
+$     perl_i_unistd = "undef"
+$   ELSE
+$     perl_i_unistd = "define"
+
+$   ENDIF
+$ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
+$!
+$! Check to see if we've got shadow.h (probably not, but...)
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <shadow.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$!   Okay, failed. Must not have it
+$     perl_i_shadow = "undef"
+$   ELSE
+$     perl_i_shadow = "define"
+
+$   ENDIF
+$ WRITE_RESULT "i_shadow is ''perl_i_shadow'"
+$!
+$! Check to see if we've got socks.h (probably not, but...)
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <socks.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$!   Okay, failed. Must not have it
+$     perl_i_socks = "undef"
+$   ELSE
+$     perl_i_socks = "define"
+
+$   ENDIF
+$ WRITE_RESULT "i_socks is ''perl_i_socks'"
+$!
+$! Check the prototype for select
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#include <unistd.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$  WS "#include <socketshr.h>"
+$ else
+$  WS "#include <time.h>
+$  WS "#include <socket.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "fd_set *foo;
+$ WS "int bar;
+$ WS "foo = NULL;
+$ WS "bar = select(2, foo, foo, foo, NULL);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
 $   if (teststatus.nes."1")
 $   THEN
-$!   Okay, failed. Must not have it
-$     perl_i_unistd = "undef"
+$!   Okay, fd_set failed. Must be an int
+$     perl_selecttype = "int *"
+$   ELSE
+$     perl_selecttype="fd_set *"
+$   ENDIF
+$ ELSE
+$   ! No sockets, so stick in an int *
+$   perl_selecttype = "int *"
+$ ENDIF
+$ WRITE_RESULT "selectype is ''perl_selecttype'"
+$!
+$! Check to see if fd_set exists
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#include <unistd.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$  WS "#include <socketshr.h>"
+$ ENDIF
+$ IF ("''Has_Dec_C_Sockets'".eqs."T")
+$ THEN
+$  WS "#include <time.h>
+$  WS "#include <socket.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "fd_set *foo;
+$ WS "int bar;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$!  Okay, fd_set failed. Must not exist
+$   perl_d_fd_set = "undef"
+$ ELSE
+$   perl_d_fd_set="define"
+$ ENDIF
+$ WRITE_RESULT "d_fd_set is ''perl_d_fd_set'"
+$!
+$! Check for inttypes.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <inttypes.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_inttypes="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_inttypes="undef"
+$     ELSE
+$       perl_i_inttypes="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_inttypes is ''perl_i_inttypes'"
+$!
+$! Check to see if int64_t exists
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#''perl_i_inttypes IIH
+$ WS "#ifdef IIH
+$ WS "#include <inttypes.h>
+$ WS "#endif
+$ WS "#include <unistd.h>
+$ WS "int main()
+$ WS "{"
+$ WS "int64_t bar;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$!  Okay, int64_t failed. Must not exist
+$   perl_d_int64t = "undef"
+$ ELSE
+$   perl_d_int64t="define"
+$ ENDIF
+$ WRITE_RESULT "d_int64t is ''perl_d_int64t'"
+$!
+$! Check to see if off64_t exists
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#''perl_i_inttypes IIH
+$ WS "#ifdef IIH
+$ WS "#include <inttypes.h>
+$ WS "#endif
+$ WS "#include <unistd.h>
+$ WS "int main()
+$ WS "{"
+$ WS "off64_t bar;
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$ DEFINE SYS$ERROR _NLA0:
+$ DEFINE SYS$OUTPUT _NLA0:
+$ on error then continue
+$ on warning then continue
+$ 'Checkcc' temp.c
+$ teststatus = f$extract(9,1,$status)
+$ DEASSIGN SYS$OUTPUT
+$ DEASSIGN SYS$ERROR
+$ if (teststatus.nes."1")
+$ THEN
+$!  Okay, off64_t failed. Must not exist
+$   perl_d_off64_t = "undef"
+$ ELSE
+$   perl_d_off64_t="define"
+$ ENDIF
+$ WRITE_RESULT "d_off64_t is ''perl_d_off64_t'"
+$!
+$! Check to see if gethostname exists
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <types.h>
+$ WS "#include <unistd.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$  WS "#include <socketshr.h>"
+$ else
+$  WS "#include <time.h>
+$  WS "#include <socket.h>
+$ endif
+$ WS "int main()
+$ WS "{"
+$ WS "char name[100];
+$ WS "int bar, baz;
+$ WS "bar = 100;
+$ WS "baz = gethostname(name, bar);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$!   Okay, compile failed. Must not have it
+$     perl_dgethname = "undef"
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_gethname="undef"
+$     ELSE
+$       perl_d_gethname="define"
+$     ENDIF
+$   ENDIF
+$ ELSE
+$   ! No sockets, so no gethname
+$   perl_d_gethname = "undef"
+$ ENDIF
+$ WRITE_RESULT "d_gethname is ''perl_d_gethname'"
+$!
+$! Check for sys/file.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/file.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_sysfile="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_sysfile="undef"
+$     ELSE
+$       perl_i_sysfile="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'"
+$!
+$! Check for poll.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <poll.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_poll="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_poll="undef"
+$     ELSE
+$       perl_i_poll="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_poll is ''perl_i_poll'"
+$!
+$! Check for sys/uio.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/uio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_sysuio="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_sysuio="undef"
+$     ELSE
+$       perl_i_sysuio="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_sysuio is ''perl_i_sysuio'"
+$!
+$! Check for sys/access.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/access.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_sysaccess="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_sysaccess="undef"
+$     ELSE
+$       perl_i_sysaccess="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_sysaccess is ''perl_i_sysaccess'"
+$!
+$! Check for sys/security.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <sys/security.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_syssecrt="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_syssecrt="undef"
+$     ELSE
+$       perl_i_syssecrt="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_syssecrt is ''perl_i_syssecrt'"
+$!
+$! Check for fcntl.h
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <fcntl.h>
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_fcntl="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_i_fcntl="undef"
+$     ELSE
+$       perl_i_fcntl="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "i_fcntl is ''perl_i_fcntl'"
+$!
+$! Check for fcntl
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ WS "#include <fcntl.h>
+$ WS "int main()
+$ WS "{"
+$ WS "fcntl(1,2,3);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_fcntl="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_fcntl="undef"
+$     ELSE
+$       perl_d_fcntl="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
+$!
+$! Check for memchr
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <string.h>
+$ WS "int main()
+$ WS "{"
+$ WS "char * place;
+$ WS "place = memchr(""foo"", 47, 3)
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_memchr="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_memchr="undef"
+$     ELSE
+$       perl_d_memchr="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "d_memchr is ''perl_d_memchr'"
+$!
+$! Check for strtoull
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <string.h>
+$ WS "int main()
+$ WS "{"
+$ WS "unsigned __int64 result;
+$ WS "result = strtoull(""123123"", NULL, 10);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_strtoull="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_strtoull="undef"
+$     ELSE
+$       perl_d_strtoull="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "d_strtoull is ''perl_d_strtoull'"
+$!
+$! Check for atoll
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <string.h>
+$ WS "int main()
+$ WS "{"
+$ WS " __int64 result;
+$ WS "result = atoll(""123123"");
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_atoll="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$   ELSE
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_atoll="undef"
+$     ELSE
+$       perl_d_atoll="define"
+$     ENDIF
+$   ENDIF
+$ WRITE_RESULT "d_atoll is ''perl_d_atoll'"
+$!
+$! Check for atoll
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <string.h>
+$ WS "int main()
+$ WS "{"
+$ WS "long double
+$ WS "result = atolf(""123123"");
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_atolf="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
 $   ELSE
-$     perl_i_unistd = "define"
-
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_atolf="undef"
+$     ELSE
+$       perl_d_atolf="define"
+$     ENDIF
 $   ENDIF
-$ WRITE_RESULT "i_unistd is ''perl_i_unistd'"
+$ WRITE_RESULT "d_atolf is ''perl_d_atolf'"
 $!
-$! Check the prototype for select
+$! Check for access
 $!
-$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
-$ THEN
 $ OS
 $ WS "#ifdef __DECC
 $ WS "#include <stdlib.h>
 $ WS "#endif
 $ WS "#include <stdio.h>
-$ WS "#include <types.h>
 $ WS "#include <unistd.h>
-$ if ("''Has_Socketshr'".eqs."T")
-$ THEN
-$  WS "#include <socketshr.h>"
-$ else
-$  WS "#include <time.h>
-$  WS "#include <socket.h>
-$ endif
 $ WS "int main()
 $ WS "{"
-$ WS "fd_set *foo;
-$ WS "int bar;
-$ WS "foo = NULL;
-$ WS "bar = select(2, foo, foo, foo, NULL);
+$ WS "access("foo", F_OK);
 $ WS "exit(0);
 $ WS "}"
 $ CS
@@ -814,22 +1796,33 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
-$   teststatus = f$extract(9,1,$status)
-$   DEASSIGN SYS$OUTPUT
-$   DEASSIGN SYS$ERROR
+$   'Checkcc' temp.c
+$   savedstatus = $status
+$   teststatus = f$extract(9,1,savedstatus)
 $   if (teststatus.nes."1")
 $   THEN
-$!   Okay, fd_set failed. Must be an int
-$     perl_selecttype = "int *"
+$     perl_d_access="undef"
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
 $   ELSE
-$     perl_selecttype="fd_set *"
+$     If (Needs_Opt.eqs."Yes")
+$     THEN
+$       link temp.obj,temp.opt/opt
+$     else
+$       link temp.obj
+$     endif
+$     savedstatus = $status
+$     teststatus = f$extract(9,1,savedstatus)
+$     DEASSIGN SYS$OUTPUT
+$     DEASSIGN SYS$ERROR
+$     if (teststatus.nes."1")
+$     THEN
+$       perl_d_access="undef"
+$     ELSE
+$       perl_d_access="define"
+$     ENDIF
 $   ENDIF
-$ ELSE
-$   ! No sockets, so stick in an int *
-$   perl_selecttype = "int *"
-$ ENDIF
-$ WRITE_RESULT "selectype is ''perl_selecttype'"
+$ WRITE_RESULT "d_access is ''perl_d_access'"
 $!
 $! Check for bzero
 $!
@@ -850,7 +1843,7 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   savedstatus = $status
 $   teststatus = f$extract(9,1,savedstatus)
 $   if (teststatus.nes."1")
@@ -861,9 +1854,9 @@ $     DEASSIGN SYS$ERROR
 $   ELSE
 $     If (Needs_Opt.eqs."Yes")
 $     THEN
-$       link temp,temp/opt
+$       link temp.obj,temp.opt/opt
 $     else
-$       link temp
+$       link temp.obj
 $     endif
 $     savedstatus = $status
 $     teststatus = f$extract(9,1,savedstatus)
@@ -897,7 +1890,7 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   savedstatus = $status
 $   teststatus = f$extract(9,1,savedstatus)
 $   if (teststatus.nes."1")
@@ -908,9 +1901,9 @@ $     DEASSIGN SYS$ERROR
 $   ELSE
 $     If (Needs_Opt.eqs."Yes")
 $     THEN
-$       link temp,temp/opt
+$       link temp.obj,temp.opt/opt
 $     else
-$       link temp
+$       link temp.obj
 $     endif
 $     savedstatus = $status
 $     teststatus = f$extract(9,1,savedstatus)
@@ -942,12 +1935,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   savedstatus = $status
 $   teststatus = f$extract(9,1,savedstatus)
@@ -981,12 +1974,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -999,6 +1992,41 @@ $     perl_d_setvbuf="define"
 $   ENDIF
 $ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'"
 $!
+$! Check for setenv
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "setenv(""FOO"", ""BAR"", 0);
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp
+$   If (Needs_Opt.eqs."Yes")
+$   THEN
+$     link temp,temp/opt
+$   else
+$     link temp
+$   endif
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_d_setenv="undef"
+$   ELSE
+$     perl_d_setenv="define"
+$   ENDIF
+$ WRITE_RESULT "d_setenv is ''perl_d_setenv'"
+$!
 $! Check for <netinet/in.h>
 $!
 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
@@ -1024,12 +2052,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1045,6 +2073,52 @@ $   perl_i_niin="undef"
 $ ENDIF
 $ WRITE_RESULT "i_niin is ''perl_i_niin'"
 $!
+$! Check for <netinet/tcp.h>
+$!
+$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
+$ THEN
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ if ("''Has_Socketshr'".eqs."T")
+$ THEN
+$  WS "#include <socketshr.h>"
+$ else
+$  WS "#include <netdb.h>
+$ endif
+$ WS "#include <netinet/tcp.h>"
+$ WS "int main()
+$ WS "{"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   on error then continue
+$   on warning then continue
+$   'Checkcc' temp.c
+$   If (Needs_Opt.eqs."Yes")
+$   THEN
+$     link temp.obj,temp.opt/opt
+$   else
+$     link temp.obj
+$   endif
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_i_netinettcp="undef"
+$   ELSE
+$     perl_i_netinettcp="define"
+$   ENDIF
+$ ELSE
+$   perl_i_netinettcp="undef"
+$ ENDIF
+$ WRITE_RESULT "i_netinettcp is ''perl_i_netinettcp'"
+$!
 $! Check for endhostent
 $!
 $ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T")
@@ -1070,12 +2144,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1116,12 +2190,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1162,12 +2236,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1208,12 +2282,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1254,12 +2328,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1300,12 +2374,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1346,12 +2420,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1392,12 +2466,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1438,12 +2512,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1484,12 +2558,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1530,12 +2604,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1576,12 +2650,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
@@ -1617,7 +2691,7 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
@@ -1652,20 +2726,24 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   on error then continue
 $   on warning then continue
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   teststatus = f$extract(9,1,$status)
 $   DEASSIGN SYS$OUTPUT
 $   DEASSIGN SYS$ERROR
 $   if (teststatus.nes."1")
 $   THEN
 $     perl_d_sched_yield="undef"
+$     perl_sched_yield = " "
 $   ELSE
 $     perl_d_sched_yield="define"
+$     perl_sched_yield = "sched_yield"
 $   ENDIF
 $ ELSE
 $   perl_d_sched_yield="undef"
+$   perl_sched_yield = " "
 $ ENDIF
 $ WRITE_RESULT "d_sched_yield is ''perl_d_sched_yield'"
+$ WRITE_RESULT "sched_yield is ''perl_sched_yield'"
 $!
 $! Check for generic pointer size
 $!
@@ -1688,12 +2766,12 @@ $   DEFINE SYS$ERROR _NLA0:
 $   DEFINE SYS$OUTPUT _NLA0:
 $   ON ERROR THEN CONTINUE
 $   ON WARNING THEN CONTINUE
-$   'Checkcc' temp
+$   'Checkcc' temp.c
 $   If (Needs_Opt.eqs."Yes")
 $   THEN
-$     link temp,temp/opt
+$     link temp.obj,temp.opt/opt
 $   else
-$     link temp
+$     link temp.obj
 $   endif
 $   OPEN/WRITE TEMPOUT [-.uu]tempout.lis
 $   DEASSIGN SYS$OUTPUT
@@ -1711,6 +2789,77 @@ $
 $ perl_ptrsize=line
 $ WRITE_RESULT "ptrsize is ''perl_ptrsize'"
 $!
+$!
+$! Check rand48 and its ilk
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "srand48(12L);"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$! copy temp.c sys$output
+$!
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   ON ERROR THEN CONTINUE
+$   ON WARNING THEN CONTINUE
+$   'Checkcc' temp
+$   If (Needs_Opt.eqs."Yes")
+$   THEN
+$     link temp,temp.opt/opt
+$   else
+$     link temp
+$   endif
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_drand01="random()"
+$     perl_randseedtype = "unsigned"
+$     perl_seedfunc = "srandom"
+$   ENDIF
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "int main()
+$ WS "{"
+$ WS "srandom(12);"
+$ WS "exit(0);
+$ WS "}"
+$ CS
+$! copy temp.c sys$output
+$!
+$   DEFINE SYS$ERROR _NLA0:
+$   DEFINE SYS$OUTPUT _NLA0:
+$   ON ERROR THEN CONTINUE
+$   ON WARNING THEN CONTINUE
+$   'Checkcc' temp
+$   If (Needs_Opt.eqs."Yes")
+$   THEN
+$     link temp,temp.opt/opt
+$   else
+$     link temp
+$   endif
+$   teststatus = f$extract(9,1,$status)
+$   DEASSIGN SYS$OUTPUT
+$   DEASSIGN SYS$ERROR
+$   if (teststatus.nes."1")
+$   THEN
+$     perl_drand01="(((float)rand())/((float)RAND_MAX))"
+$     perl_randseedtype = "unsigned"
+$     perl_seedfunc = "srand"
+$   ENDIF
+$ WRITE_RESULT "drand01 is ''perl_drand01'"
+$!
 $ set nover
 $! Done with compiler checks. Clean up.
 $ if f$search("temp.c").nes."" then DELETE/NOLOG temp.c;*
@@ -1746,8 +2895,9 @@ $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""F
 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",""SPARE18"",""SPARE19"",""CHLD"",""CONT"",""STOP"",""TSTP"","
 $ psnwc3="""TTIN"",""TTOU"",""DEBUG"",""SPARE27"",""SPARE28"",""SPARE29"",""SPARE30"",""SPARE31"",""SPARE32"",""RTMIN"",""RTMAX"",0"
 $perl_sig_name_with_commas = psnwc1 + psnwc2 + psnwc3
-$ perl_sig_num="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,64,0"
-$ perl_sig_num_with_commas=perl_sig_num
+$ perl_sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 64"","0"
+$ perl_sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,64,0"
+$ perl_sig_num_with_commas=perl_sig_num_init
 $ perl_uidtype="uid_t"
 $ perl_d_pathconf="define"
 $ perl_d_fpathconf="define"
@@ -1766,8 +2916,9 @@ $ perl_sig_name="ZERO HUP INT QUIT ILL TRAP IOT EMT FPE KILL BUS SEGV SYS PIPE A
 $ psnwc1="""ZERO"",""HUP"",""INT"",""QUIT"",""ILL"",""TRAP"",""IOT"",""EMT"",""FPE"",""KILL"",""BUS"",""SEGV"",""SYS"","
 $ psnwc2="""PIPE"",""ALRM"",""TERM"",""ABRT"",""USR1"",""USR2"",0"
 $ perl_sig_name_with_commas = psnwc1 + psnwc2
-$ perl_sig_num="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
-$ perl_sig_num_with_commas=perl_sig_num
+$ perl_sig_num="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 16 17"",0"
+$ perl_sig_num_init="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,6,16,17,0"
+$ perl_sig_num_with_commas=perl_sig_num_init
 $ perl_uidtype="unsigned int"
 $ perl_d_pathconf="undef"
 $ perl_d_fpathconf="undef"
@@ -1906,6 +3057,14 @@ $   THEN
 $     perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'"
 $   ENDIF
 $ ENDIF
+$ if use_vmsdebug_perl .eqs. "Y"
+$ then
+$     perl_optimize="/Debug/NoOpt"
+$     perl_dbgprefix = "DBG"
+$ else
+$     perl_optimize= ""
+$     perl_dbgprefix = ""
+$ endif
 $!
 $! Finally clean off any leading zeros from the patchlevel or subversion
 $ perl_patchlevel = perl_patchlevel + 0
@@ -1918,6 +3077,7 @@ $!
 $ WC "# This file generated by Configure.COM on a VMS system."
 $ WC "# Time: " + perl_cf_time
 $ WC ""
+$ WC "CONFIGDOTSH=true"
 $ WC "package='" + perl_package + "'"
 $ WC "CONFIG='" + perl_config + "'"
 $ WC "cf_time='" + perl_cf_time + "'"
@@ -1961,6 +3121,8 @@ $ WC "vms_cc_type='" + perl_vms_cc_type + "'"
 $ WC "d_attribut='" + perl_d_attribut + "'"
 $ WC "cc='" + perl_cc + "'"
 $ WC "ccflags='" + perl_ccflags + "'"
+$ WC "optimize='" + perl_optimize + "'"
+$ WC "dbgprefix='" + perl_dbgprefix + "'"
 $ WC "d_vms_do_sockets='" + perl_d_vms_do_sockets + "'"
 $ WC "d_socket='" + perl_d_socket + "'"
 $ WC "d_sockpair='" + perl_d_sockpair + "'"
@@ -1968,6 +3130,7 @@ $ WC "d_gethent='" + perl_d_gethent + "'"
 $ WC "d_getsent='" + perl_d_getsent + "'"
 $ WC "d_select='" + perl_d_select + "'"
 $ WC "i_niin='" + perl_i_niin + "'"
+$ WC "i_netinettcp='" + perl_i_netinettcp + "'"
 $ WC "i_neterrno='" + perl_i_neterrno + "'"
 $ WC "d_stdstdio='" + perl_d_stdstdio + "'"
 $ WC "d_stdio_ptr_lval='" + perl_d_stdio_ptr_lval + "'"
@@ -2167,6 +3330,7 @@ $ WC "intsize='" + perl_intsize + "'"
 $ WC "longsize='" + perl_longsize + "'"
 $ WC "shortsize='" + perl_shortsize + "'"
 $ WC "lseektype='" + perl_lseektype + "'"
+$ WC "lseeksize='4'"
 $ WC "i_values='" + perl_i_values + "'"
 $ WC "malloctype='" + perl_malloctype + "'"
 $ WC "freetype='" + perl_freetype + "'"
@@ -2229,6 +3393,10 @@ $ WC "voidflags='" + perl_voidflags + "'"
 $ WC "d_eunice='" + perl_d_eunice + "'"
 $ WC "libs='" + perl_libs + "'"
 $ WC "libc='" + perl_libc + "'"
+$ tempstring = "PERL_VERSION='" + "''perl_patchlevel'" + "'"
+$ WC tempstring
+$ tempstring = "PERL_SUBVERSION='" + "''perl_patchlevel'" + "'"
+$ WC tempstring
 $ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'"
 $ WC tempstring
 $ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'"
@@ -2265,6 +3433,7 @@ $ WC "d_longlong='" + perl_d_longlong + "'"
 $ WC "longlongsize='" + perl_longlongsize + "'"
 $ WC "d_mkstemp='" + perl_d_mkstemp + "'"
 $ WC "d_setvbuf='" + perl_d_setvbuf + "'"
+$ WC "d_setenv='" + perl_d_setenv + "'"
 $ WC "d_endhent='" + perl_d_endhent + "'"
 $ WC "d_endnent='" + perl_d_endsent + "'"
 $ WC "d_endpent='" + perl_d_endpent + "'"
@@ -2276,6 +3445,7 @@ $ WC "d_getsent='" + perl_d_getsent + "'"
 $ WC "d_sethent='" + perl_d_sethent + "'"
 $ WC "d_setnent='" + perl_d_setsent + "'"
 $ WC "d_setpent='" + perl_d_setpent + "'"
+$ WC "ebcdic='" + perl_ebcdic + "'"
 $ WC "d_setsent='" + perl_d_setsent + "'"
 $ WC "d_gethostprotos='" + perl_d_gethostprotos + "'"
 $ WC "d_getnetprotos='" + perl_d_getnetprotos + "'"
@@ -2299,11 +3469,129 @@ $ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'"
 $ WC "extensions='" + perl_extensions + "'"
 $ WC "d_mknod='" + perl_d_mknod + "'"
 $ WC "devtype='" + perl_devtype + "'"
+$ WC "d_gethname='" + perl_d_gethname + "'"
+$ WC "d_phostname='" + perl_d_phostname + "'"
+$ WC "d_accessx='" + perl_d_accessx + "'"
+$ WC "d_eaccess='" + perl_d_eaccess + "'"
+$ WC "i_sysaccess='" + perl_i_sysaccess + "'"
+$ WC "i_syssecrt='" + perl_i_syssecrt + "'"
+$ WC "d_fd_set='" + perl_d_fd_set + "'"
+$ WC "d_access='" + perl_d_access + "'"
+$ WC "d_msg_ctrunc='" + perl_d_msg_ctrunc + "'"
+$ WC "d_msg_dontroute='" + perl_d_msg_dontroute + "'"
+$ WC "d_msg_oob='" + perl_d_msg_oob + "'"
+$ WC "d_msg_peek='" + perl_d_msg_peek + "'"
+$ WC "d_msg_proxy='" + perl_d_msg_proxy + "'"
+$ WC "d_scm_rights='" + perl_d_scm_rights + "'"
+$ WC "d_sendmsg='" + perl_d_sendmsg + "'"
+$ WC "d_recvmsg='" + perl_d_recvmsg + "'"
+$ WC "d_msghdr_s='" + perl_d_msghdr_s + "'"
+$ WC "d_cmsghdr_s='" + perl_d_cmsghdr_s + "'"
+$ WC "i_sysuio='" + perl_i_sysuio + "'"
+$ WC "d_fseeko='" + perl_d_fseeko + "'"
+$ WC "d_ftello='" + perl_d_ftello + "'"
+$ WC "d_readv='" + perl_d_readv + "'"
+$ WC "d_writev='" + perl_d_writev + "'"
+$ WC "i_machcthr='" + perl_i_machcthr + "'"
+$ WC "usemultiplicity='" + perl_usemultiplicity + "'"
+$ WC "d_dbminit64='" + perl_d_dbminit64 + "'"
+$ WC "d_dbmclose64='" + perl_d_dbmclose64 + "'"
+$ WC "d_fetch64='" + perl_d_fetch64 + "'"
+$ WC "d_store64='" + perl_d_store64 + "'"
+$ WC "d_delete64='" + perl_d_delete64 + "'"
+$ WC "d_firstkey64='" + perl_d_firstkey64 + "'"
+$ WC "d_nextkey64='" + perl_d_nextkey64 + "'"
+$ WC "i_poll='" + perl_i_poll + "'"
+$ WC "i_inttypes='" + perl_i_inttypes + "'"
+$ WC "d_int64t='" + perl_d_int64t + "'"
+$ WC "d_off64_t='" + perl_d_off64_t + "'"
+$ WC "d_fstat64='" + perl_d_fstat64 + "'"
+$ WC "d_ftruncate64='" + perl_d_ftruncate64 + "'"
+$ WC "d_lseek64='" + perl_d_lseek64 + "'"
+$ WC "d_lstat64='" + perl_d_lstat64 + "'"
+$ WC "d_open64='" + perl_d_open64 + "'"
+$ WC "d_opendir64='" + perl_d_opendir64 + "'"
+$ WC "d_readdir64='" + perl_d_readdir64 + "'"
+$ WC "d_seekdir64='" + perl_d_seekdir64 + "'"
+$ WC "d_stat64='" + perl_d_stat64 + "'"
+$ WC "d_telldir64='" + perl_d_telldir64 + "'"
+$ WC "d_truncate64='" + perl_d_truncate64 + "'"
+$ WC "d_dirent64_s='" + perl_d_dirent64_s + "'"
+$ WC "use64bits='" + perl_use64bits + "'"
+$ WC "d_fgetpos64='" + perl_d_fgetpos64 + "'"
+$ WC "d_fopen64='" + perl_d_fopen64 + "'"
+$ WC "d_freopen64='" + perl_d_freopen64 + "'"
+$ WC "d_fseek64='" + perl_d_fseek64 + "'"
+$ WC "d_fseeko64='" + perl_d_fseeko64 + "'"
+$ WC "d_fsetpos64='" + perl_d_fsetpos64 + "'"
+$ WC "d_ftell64='" + perl_d_ftell64 + "'"
+$ WC "d_ftello64='" + perl_d_ftello64 + "'"
+$ WC "d_tmpfile64='" + perl_d_tmpfile64 + "'"
+$ WC "d_drand48proto='" + perl_d_drand48proto + "'"
+$ WC "d_old_pthread_create_joinable='" + perl_d_old_pthread_create_joinable + "'"
+$ WC "old_pthread_create_joinable='" + perl_old_pthread_create_joinable + "'"
+$ WC "drand01='" + perl_drand01 + "'"
+$ WC "randseedtype='" + perl_randseedtype + "'"
+$ WC "seedfunc='" + perl_seedfunc + "'"
+$ WC "sig_num_init='" + perl_sig_num_with_commas + "'"
+$ WC "i_sysmount='" + perl_i_sysmount + "'"
+$ WC "d_fstatfs='" + perl_d_fstatfs + "'"
+$ WC "d_memchr='" + perl_d_memchr + "'"
+$ WC "d_statfsflags='" + perl_d_statfsflags + "'"
+$ WC "fflushNULL='define'"
+$ WC "fflushall='undef'"
+$ WC "d_stdio_stream_array='undef'"
+$ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'"
+$ WC "i_machcthreads='" + perl_i_machcthreads + "'"
+$ WC "i_pthread='" + perl_i_pthread + "'"
+$ WC "d_fstatvfs='" + perl_d_fstatvfs + "'"
+$ WC "i_mntent='" + perl_i_mntent + "'"
+$ WC "d_getmntent='" + perl_d_getmntent + "'"
+$ WC "d_hasmntopt='" + perl_d_hasmntopt + "'"
+$ WC "d_telldirproto='" + perl_d_telldirproto + "'"
+$ WC "d_madvise='" + perl_d_madvise + "'"
+$ WC "d_msync='" + perl_d_msync + "'"
+$ WC "d_mprotect='" + perl_d_mprotect + "'"
+$ WC "d_munmap='" + perl_d_munmap + "'"
+$ WC "d_mmap='" + perl_d_mmap + "'"
+$ WC "i_sysmman='" + perl_i_sysmman + "'"
+$ WC "installusrbinperl='" + perl_installusrbinperl + "'"
+$! WC "selectminbits='" + perl_selectminbits + "'"
+$ WC "crosscompile='" + perl_crosscompile + "'"
+$ WC "multiarch='" + perl_multiarch + "'"
+$ WC "sched_yield='" + perl_sched_yield + "'"
+$ WC "d_strtoull='" + perl_d_strtoull + "'"
+$ WC "usesocks='" + perl_usesocks + "'"
+$ WC "d_vendorlib='" + perl_d_vendorlib + "'"
+$ WC "vendorlibexp='" + perl_vendorlibexp + "'"
+$ WC "d_atolf='" + perl_d_atolf + "'"
+$ WC "d_atoll='" + perl_d_atoll + "'"
+$ WC "d_bincompat5005='" + perl_d_bincompat + "'"
+$ WC "d_endspent='" + perl_d_endspent + "'"
+$ WC "d_getspent='" + perl_d_getspent + "'"
+$ WC "d_getspnam='" + perl_d_getspnam + "'"
+$ WC "d_setspent='" + perl_d_setspent + "'"
+$ WC "i_shadow='" + perl_i_shadow + "'"
+$ WC "i_socks='" + perl_i_socks + "'"
+$ WC "d_PRIfldbl='" + perl_d_PRIfldbl + "'"
+$ WC "d_PRIgldbl='" + perl_d_PRIgldbl + "'"
+$ WC "d_PRId64='" + perl_d_PRId64 + "'"
+$ WC "d_PRIu64='" + perl_d_PRIu64 + "'"
+$ WC "d_PRIo64='" + perl_d_PRIo64 + "'"
+$ WC "d_PRIx64='" + perl_d_PRIx64 + "'"
+$ WC "sPRIfldbl='" + perl_sPRIfldbl + "'"
+$ WC "sPRIgldbl='" + perl_sPRIgldbl + "'"
+$ WC "sPRId64='" + perl_sPRId64 + "'"
+$ WC "sPRIu64='" + perl_sPRIu64 + "'"
+$ WC "sPRIo64='" + perl_sPRIo64 + "'"
+$ WC "sPRIx64='" + perl_sPRIx64 + "'"
+$!
+$! ##WRITE NEW CONSTANTS HERE##
 $!
 $ Close CONFIGSH
 $
 $! Okay, we've gotten here. Build munchconfig and run it
-$ 'Perl_CC' munchconfig
+$ 'Perl_CC' munchconfig.c
 $ If (Needs_Opt.eqs."Yes")
 $ THEN
 $   open/write OPTCHAN []munchconfig.opt
@@ -2313,12 +3601,13 @@ $     write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library"
 $   endif
 $   write OPTCHAN "Sys$Share:VAXCRTL/Share"
 $   Close OPTCHAN
-$   link munchconfig,munchconfig/opt
+$   link munchconfig.obj,munchconfig.opt/opt
 $   delete munchconfig.opt;*
 $ else
-$   link munchconfig
+$   link munchconfig.obj
 $ endif
-$ WRITE_RESULT "Writing config.h"
+$ echo ""
+$ echo "Writing config.h"
 $ !
 $ ! we need an fdl file
 $ CREATE [-]CONFIG.FDL
@@ -2332,10 +3621,6 @@ $ if use_debugging_perl.eqs."Y"
 $ THEN
 $   WRITE CONFIG "#define DEBUGGING"
 $ ENDIF
-$ if preload_env.eqs."Y"
-$ THEN
-$    WRITE CONFIG "#define PRIME_ENV_AT_STARTUP"
-$ ENDIF
 $ if use_two_pot_malloc.eqs."Y"
 $ THEN
 $    WRITE CONFIG "#define TWO_POT_OPTIMIZE"
@@ -2365,6 +3650,26 @@ $ if "''Has_Socketshr'".eqs."T"
 $ THEN
 $    WRITE CONFIG "#define VMS_DO_SOCKETS"
 $ ENDIF
+$! This is VMS-specific for now
+$ WRITE CONFIG "#''perl_d_setenv' HAS_SETENV"
+$ if d_alwdeftype.eqs."Y"
+$ THEN
+$    WRITE CONFIG "#define SECURE_INTERNAL_GETENV"
+$ ELSE
+$    WRITE CONFIG "#undef SECURE_INTERNAL_GETENV"
+$ ENDIF
+$ if d_secintgenv.eqs."Y"
+$ THEN
+$    WRITE CONFIG "#define ALWAYS_DEFTYPES"
+$ ELSE
+$    WRITE CONFIG "#undef ALWAYS_DEFTYPES"
+$ ENDIF
+$ if use_64bit.eqs."Y"
+$ THEN
+$    WRITE CONFIG "#define USE_LONG_LONG"
+$    WRITE CONFIG "#define USE_LONG_DOUBLE"
+$ ENDIF
+$ WRITE CONFIG "#define HAS_ENVGETENV"
 $ CLOSE CONFIG
 $!
 $! Now build the normal config.h
@@ -2395,7 +3700,7 @@ $   SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1"
 $ ELSE
 $   if "''Has_Socketshr'" .eqs."T"
 $   THEN
-$     SOCKET_REPLACE = "SOCKET=SOCKETSHRSOCKETS=1"
+$     SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1"
 $   ELSE
 $     SOCKET_REPLACE = "SOCKET="
 $   ENDIF
@@ -2423,10 +3728,66 @@ $ ARCH_TYPE = "ARCH-TYPE=__AXP__"
 $ ELSE
 $ ARCH_TYPE = "ARCH-TYPE=__VAX__"
 $ ENDIF
-$ WRITE_RESULT "Writing DESCRIP.MMS"
+$ echo "Writing DESCRIP.MMS"
 $!set ver
 $ define/user sys$output [-]descrip.mms
-$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'"
+$ mcr []munchconfig [-]config.sh descrip_mms.template "''DECC_REPLACE'" "''ARCH_TYPE'" "''GNUC_REPLACE'" "''SOCKET_REPLACE'" "''THREAD_REPLACE'" "''C_Compiler_Replace'" "''MALLOC_REPLACE'" "''Thread_Live_Dangerously'" "PV=''LocalPerlVer'"
+$ echo "Extracting Build_Ext.Com"
+$ Create Sys$Disk:[-]Build_Ext.Com
+$ Deck/Dollar="$EndOfTpl$"
+$!++ Build_Ext.Com
+$!   NOTE: This files is extracted as part of the VMS configuration process.
+$!   Any changes made to it directly will be lost.  If you need to make any
+$!   changes, please edit the template in [.vms]SubConfigure.Com instead.
+$    def = F$Environment("Default")
+$    exts1 = F$Edit(p1,"Compress")
+$    p2 = F$Edit(p2,"Upcase,Compress,Trim")
+$    If F$Locate("MCR ",p2).eq.0 Then p2 = F$Extract(3,255,p2)
+$    miniperl = "$" + F$Search(F$Parse(p2,".Exe"))
+$    makeutil = p3
+$    if f$type('p3') .nes. "" then makeutil = 'p3'
+$    targ = F$Edit(p4,"Lowercase")
+$    i = 0
+$ next_ext:
+$    ext = F$Element(i," ",p1)
+$    If ext .eqs. " " Then Goto done
+$    Define/User Perl_Env_Tables CLISYM_LOCAL
+$    miniperl
+     ($extdir = $ENV{'ext'}) =~ s/::/./g;
+     if ($extdir =~ /^vms/i) { $extdir =~ s/vms/.vms.ext/i; }
+     else                    { $extdir = ".ext.$extdir";   }
+     ($ENV{'extdir'} = "[$extdir]");
+     ($ENV{'up'} = ('-') x ($extdir =~ tr/././));
+$    Set Default &extdir
+$    redesc = 0
+$    If F$Locate("clean",targ) .eqs. F$Length(targ)
+$    Then
+$      Write Sys$Output "Building ''ext' . . ."
+$      On Error Then Goto done
+$      If F$Search("Descrip.MMS") .eqs. ""
+$      Then
+$        redesc = 1
+$      Else
+$        If F$CvTime(F$File("Descrip.MMS","rdt")) .lts. -
+            F$CvTime(F$File("Makefile.PL","rdt")) Then redesc = 1
+$      EndIf
+$    Else
+$      Write Sys$Output "''targ'ing ''ext' . . ."
+$      On Error Then Continue
+$    EndIf
+$    If redesc Then -
+       miniperl "-I[''up'.lib]" Makefile.PL "INST_LIB=[''up'.lib]" "INST_ARCHLIB=[''up'.lib]"
+$    makeutil 'targ'
+$    i = i + 1
+$    Set Def &def
+$    Goto next_ext
+$ done:
+$    sts = $Status
+$    Set Def &def
+$    Exit sts
+$!-- Build_Ext.Com
+$EndOfTpl$
+$
 $! set nover
 $!
 $! Clean up after ourselves