X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=vms%2Fsubconfigure.com;h=8650b0f12896d63b3b51cd2f55db4934ef509bcd;hb=8c99d73ee7ce90de2561496f683f3850d1269e1d;hp=2f787ff73a32daa2a2ff2a1fcd40f248db25d7aa;hpb=cb86ce0e71355d781c8bc843c5a2c7c61381dce9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/vms/subconfigure.com b/vms/subconfigure.com index 2f787ff..8650b0f 100644 --- a/vms/subconfigure.com +++ b/vms/subconfigure.com @@ -1,4 +1,7 @@ -$! SUBCONFIGURE.COM - build a config.sh for VMS Perl. +$! SUBCONFIGURE.COM +$! - build a config.sh for VMS Perl. +$! - use built config.sh to take config_h.SH -> config.h +$! - also take vms/descrip_mms.template -> descrip.mms (VMS Makefile) $! $! Note for folks from other platforms changing things in here: $! Fancy changes (based on compiler capabilities or VMS version or @@ -21,51 +24,102 @@ $! $! This .COM file expects to be called by configure.com, and thus expects $! a few symbols in the environment. Notably: $! -$! One of: Using_Dec_C, Using_Vax_C, Using_Gnu_C set to "YES" +$! One of: Using_Dec_C, Using_Gnu_C set to "YES" $! Dec_C_Version set to the Dec C version (defaults to 0 if not specified) $! Has_Socketshr set to "T" if using socketshr $! Has_Dec_C_Sockets set to "T" if using Dec C sockets $! Use_Threads set to "T" if they're using threads $! C_Compiler_Invoke is the command needed to invoke the C compiler $! +$! We'll be playing with Sys$Output; don't clutter it +$ Set NoVerify +$! $! 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""))'" $ perl_extensions := "''extensions'" -$ if f$length(Mcc) .eq. 0 then Mcc := "cc" +$ IF F$LENGTH(Mcc) .EQ. 0 THEN Mcc := "cc" $ MCC = f$edit(mcc, "UPCASE") -$ IF Mcc.eqs."CC +$ C_Compiler_Replace := "CC=CC=''Mcc'''CC_flags'" +$ IF Using_Dec_C $ THEN -$ C_Compiler_Replace := "CC=" +$ Checkcc := "''Mcc'/prefix=all" $ ELSE -$ C_Compiler_Replace := "CC=CC=''Mcc'" +$ Checkcc := "''Mcc'" $ ENDIF -$ if "''Using_Dec_C'" .eqs. "Yes" +$ cc_flags = cc_flags + extra_flags +$ IF be_case_sensitive $ THEN -$ Checkcc := "''Mcc'/prefix=all" +$ d_vms_be_case_sensitive = "define" $ ELSE -$ Checkcc := "''Mcc'" +$ d_vms_be_case_sensitive = "undef" $ ENDIF -$ cc_flags = "" -$ if use_multiplicity .eqs. "Y" +$ IF use_multiplicity $ 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") +$ IF myname .EQS. "" THEN myname = F$TRNLNM("SYS$NODE") $! $! ##ADD NEW CONSTANTS HERE## +$ perl_sizesize = "4" +$ perl_shmattype = "" +$ perl_mmaptype = "" +$ perl_gidformat = "lu" +$ perl_gidsize = "4" +$ perl_groupstype = "Gid_t" +$ perl_stdio_stream_array = "" +$ perl_uidformat = "lu" +$ perl_uidsize = "4" +$ perl_d_getcwd = "undef" +$ perl_d_nv_preserves_uv = "define" +$ perl_d_fs_data_s = "undef" +$ perl_d_getmnt = "undef" +$ perl_d_sqrtl = "define" +$ perl_d_statfs_f_flags = "undef" +$ perl_d_statfs_s = "undef" +$ perl_d_ustat = "undef" +$ perl_i_ieeefp = "undef" +$ perl_i_sunmath = "undef" +$ perl_i_sysstatfs = "undef" +$ perl_i_sysvfs = "undef" +$ perl_i_ustat = "undef" +$ perl_d_llseek="undef" +$ perl_d_iconv="undef" +$ perl_d_madvise="undef" +$ perl_selectminbits="32" +$ perl_d_vendorarch="undef" +$ perl_vendorarchexp="" +$ 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_d_getfsstat="undef" +$ perl_i_machcthreads="undef" +$ perl_i_pthread="define" $ perl_d_fstatvfs="undef" +$ perl_usesocks="undef" +$ perl_d_vendorlib="undef" +$ perl_vendorlibexp="" +$ perl_vendorlib_stem="" $ perl_d_statfsflags="undef" $ perl_i_sysstatvfs="undef" $ perl_i_mntent="undef" @@ -74,21 +128,22 @@ $ 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_qgcvt="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 = "random()" -$ perl_randseedtype = "unsigned int" -$ perl_seedfunc = "srand" +$ 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" @@ -99,41 +154,32 @@ $ 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" -$ perl_use64bits = "undef" +$ IF (use64bitint) +$ THEN +$ perl_use64bitint = "define" +$ perl_uselargefiles = "define" +$ perl_uselongdouble = "define" +$ perl_usemorebits = "define" +$ ELSE +$ perl_use64bitint = "undef" +$ perl_uselargefiles = "undef" +$ perl_uselongdouble = "undef" +$ perl_usemorebits = "undef" +$ ENDIF +$ IF (use64bitall) +$ THEN +$ perl_use64bitall = "define" +$ ELSE +$ perl_use64bitall = "undef" +$ ENDIF $ perl_d_drand48proto = "define" +$ perl_d_lseekproto = "define" $ perl_libpth="/sys$share /sys$library" $ perl_ld="Link" $ perl_lddlflags="/Share" $ perl_ranlib="" $ perl_ar="" +$ perl_full_ar="" $ perl_eunicefix=":" $ perl_hint="none" $ perl_i_arpainet="undef" @@ -177,7 +223,7 @@ $ perl_d_mknod="undef" $ perl_d_union_semun="undef" $ perl_d_semctl_semun="undef" $ perl_d_semctl_semid_ds="undef" -$ IF (sharedperl.EQS."Y") +$ IF (sharedperl .AND. F$GETSYI("HW_MODEL") .GE. 1024) $ THEN $ perl_obj_ext=".abj" $ perl_so="axe" @@ -196,14 +242,17 @@ $ 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_cpprun="''Perl_CC'/noobj/preprocess=sys$output sys$input" +$ perl_cpplast=" " +$ perl_aphostname="" $ 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" @@ -322,6 +371,7 @@ $ perl_d_chown="define" $ perl_d_chroot="undef" $ perl_d_cuserid="define" $ perl_d_dbl_dig="define" +$ perl_d_ldbl_dig="define" $ perl_d_difftime="define" $ perl_d_fork="undef" $ perl_d_getlogin="define" @@ -348,24 +398,25 @@ $ perl_lseektype="int" $ perl_i_values="undef" $ perl_malloctype="void *" $ perl_freetype="void" -$ if "''mymalloc'".eqs."Y" +$ IF mymalloc $ THEN $ perl_d_mymalloc="define" $ ELSE $ perl_d_mymalloc="undef" -$ENDIF +$ 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]" $ perl_privlib="''perl_prefix':[lib]" $ perl_sitelibexp="''perl_prefix':[lib.site_perl]" $ perl_sitelib="''perl_prefix':[lib.site_perl]" +$ perl_sitelib_stem="''perl_prefix':[lib.site_perl]" $ perl_sizetype="size_t" $ perl_i_sysparam="undef" $ perl_d_void_closedir="define" @@ -392,61 +443,91 @@ $ 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" $ perl_d_eunice="undef" $ perl_d_pwgecos="define" -$ IF ("''Use_Threads'".eqs."T").and.("''VMS_VER'".LES."6.2") +$ IF ((Use_Threads) .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") +$ IF Using_Dec_C $ THEN -$ perl_libc="(DECCRTL)" +$ perl_libc="(DECCRTL)" $ ELSE -$ perl_libc="" +$ perl_libc=" " $ ENDIF -$ perl_PATCHLEVEL="''patchlevel'" -$ perl_SUBVERSION="''subversion'" $ perl_pager="most" $! +$! Are we 64 bit? $! -$! Now some that we build up -$! -$ LocalTime = f$time() -$ perl_cf_time= f$extract(0, 3, f$cvtime(LocalTime,, "WEEKDAY")) + " " + - - f$edit(f$cvtime(LocalTime, "ABSOLUTE", "MONTH"), "LOWERCASE") + - - " " + f$cvtime(LocalTime,, "DAY") + " " + f$cvtime(LocalTime,, "TIME") + - - " " + f$cvtime(LocalTime,, "YEAR") -$ if f$getsyi("HW_MODEL").ge.1024 +$ IF (use64bitint) $ THEN -$ perl_arch="VMS_AXP" -$ perl_archname="VMS_AXP" -$ perl_alignbytes="8" +$ 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""" +$ perl_d_quad = "define" +$ perl_quadtype = "long long" +$ perl_uquadtype = "unsigned long long" +$ perl_quadkind = "QUAD_IS_LONG_LONG" $ ELSE -$ perl_arch="VMS_VAX" -$ perl_archname="VMS_VAX" -$ perl_alignbytes="8" +$ 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 = "" +$ perl_d_quad = "undef" +$ perl_quadtype = "long" +$ perl_uquadtype = "unsigned long" +$ perl_quadkind = "QUAD_IS_LONG" $ ENDIF -$ if ("''Use_Threads'".eqs."T") -$ THEN -$ perl_arch = "''perl_arch'-thread" -$ perl_archname = "''perl_archname'-thread" -$ ELSE -$ perl_d_pthread_create_joinable = "undef" -$ perl_pthread_create_joinable = "" -$ ENDIF -$ perl_osvers=f$edit(osvers, "TRIM") -$ if (perl_subversion + 0).eq.0 +$! +$! Now some that we build up +$! +$ IF Use_Threads $ THEN -$ LocalPerlVer = "5_" + Perl_PATCHLEVEL +$ if use_5005_threads +$ THEN +$ arch = "''arch'-thread" +$ archname = "''archname'-thread" +$ perl_d_old_pthread_create_joinable = "undef" +$ perl_old_pthread_create_joinable = " " +$ perl_use5005threads = "define" +$ perl_useithreads = "undef" +$ ELSE +$ arch = "''arch'-ithread" +$ archname = "''archname'-ithread" +$ perl_d_old_pthread_create_joinable = "undef" +$ perl_old_pthread_create_joinable = " " +$ perl_use5005threads = "undef" +$ perl_useithreads = "define" +$ ENDIF $ ELSE -$ LocalPerlVer = "5_" + Perl_PATCHLEVEL + perl_subversion +$ perl_d_old_pthread_create_joinable = "undef" +$ perl_old_pthread_create_joinable = " " +$ perl_use5005threads = "undef" +$ perl_useithreads = "undef" $ ENDIF $! $! Some that we need to invoke the compiler for @@ -454,17 +535,14 @@ $ OS := "open/write SOURCECHAN []temp.c" $ WS := "write SOURCECHAN" $ CS := "close SOURCECHAN" $ DS := "delete/nolog []temp.*;*" -$ Needs_Opt := "No" -$ if ("''using_vax_c'".eqs."Yes").or.("''using_gnu_c'".eqs."Yes") +$ Needs_Opt := N +$ IF using_gnu_c $ THEN $ open/write OPTCHAN []temp.opt -$ IF ("''using_gnu_c'".eqs."Yes") -$ THEN -$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library" -$ endif +$ write OPTCHAN "Gnu_CC:[000000]gcclib.olb/library" $ write OPTCHAN "Sys$Share:VAXCRTL/Share" $ Close OPTCHAN -$ Needs_Opt := "Yes" +$ Needs_Opt := Y $ ENDIF $! $! Check for __STDC__ @@ -489,7 +567,7 @@ $ DEFINE SYS$OUTPUT _NLA0: $ ON ERROR THEN CONTINUE $ ON WARNING THEN CONTINUE $ 'Checkcc' temp.c -$ If (Needs_Opt.eqs."Yes") +$ If Needs_Opt $ THEN $ link temp.obj,temp.opt/opt $ else @@ -507,7 +585,7 @@ $ DEASSIGN SYS$ERROR $ OPEN/READ TEMPOUT [-.uu]tempout.lis $ READ TEMPOUT line $ CLOSE TEMPOUT -$ +$ DELETE/NOLOG [-.uu]tempout.lis; $ perl_cpp_stuff=line $ WRITE_RESULT "cpp_stuff is ''perl_cpp_stuff'" $! @@ -531,13 +609,12 @@ $ DEFINE SYS$OUTPUT _NLA0: $ ON ERROR THEN CONTINUE $ ON WARNING THEN CONTINUE $ 'Checkcc' temp.c -$ If (Needs_Opt.eqs."Yes") +$ If Needs_Opt $ THEN $ link temp.obj,temp.opt/opt $ else $ link temp.obj $ endif -$! link temp.obj $ OPEN/WRITE TEMPOUT [-.uu]tempout.lis $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR @@ -550,6 +627,7 @@ $ DEASSIGN SYS$ERROR $ OPEN/READ TEMPOUT [-.uu]tempout.lis $ READ TEMPOUT line $ CLOSE TEMPOUT +$ DELETE/NOLOG [-.uu]tempout.lis; $ $ perl_doublesize=line $ WRITE_RESULT "doublesize is ''perl_doublesize'" @@ -580,16 +658,16 @@ $ perl_d_longdbl="undef" $ ELSE $ ON ERROR THEN CONTINUE $ ON WARNING THEN CONTINUE -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN -$ link temp.obj,temp.opt/opt -$ else +$ link temp.obj,temp.opt/opt +$ ELSE $ link temp.obj -$ endif +$ ENDIF $ teststatus = f$extract(9,1,$status) $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR -$ if (teststatus.nes."1") +$ IF (teststatus.nes."1") $ THEN $ perl_longdblsize="0" $ perl_d_longdbl="undef" @@ -604,7 +682,7 @@ $ DEASSIGN SYS$ERROR $ OPEN/READ TEMPOUT [-.uu]tempout.lis $ READ TEMPOUT line $ CLOSE TEMPOUT -$ +$ DELETE/NOLOG [-.uu]tempout.lis; $ perl_longdblsize=line $ perl_d_longdbl="define" $ ENDIF @@ -630,12 +708,12 @@ $ DEFINE SYS$OUTPUT _NLA0: $ on error then continue $ on warning then continue $ 'Checkcc' temp.c -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN $ link temp.obj,temp.opt/opt -$ else +$ ELSE $ link temp.obj -$ endif +$ ENDIF $ teststatus = f$extract(9,1,$status) $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR @@ -654,23 +732,25 @@ $ DEASSIGN SYS$ERROR $ OPEN/READ TEMPOUT [-.uu]tempout.lis $ READ TEMPOUT line $ CLOSE TEMPOUT -$ +$ DELETE/NOLOG [-.uu]tempout.lis; $ perl_longlongsize=line $ perl_d_longlong="define" $ ENDIF $ WRITE_RESULT "longlongsize is ''perl_longlongsize'" $ WRITE_RESULT "d_longlong is ''perl_d_longlong'" $! -$! Check for int size +$! Check the prototype for getgid $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif $ WS "#include +$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" -$ WS "printf(""%d\n"", sizeof(int)); +$ WS "gid_t foo; $ WS "exit(0); $ WS "}" $ CS @@ -679,86 +759,30 @@ $ 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 -$ If (Needs_Opt.eqs."Yes") -$ THEN -$ link temp.obj,temp.opt/opt -$ else -$ link temp.obj -$ endif -$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis -$ DEASSIGN SYS$OUTPUT -$ DEASSIGN SYS$ERROR -$ DEFINE SYS$ERROR TEMPOUT -$ DEFINE SYS$OUTPUT TEMPOUT -$ mcr []temp -$ CLOSE TEMPOUT +$ teststatus = f$extract(9,1,$status) $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR -$ OPEN/READ TEMPOUT [-.uu]tempout.lis -$ READ TEMPOUT line -$ CLOSE TEMPOUT -$ -$ perl_intsize=line -$ WRITE_RESULT "intsize is ''perl_intsize'" -$! -$! Check for short size -$! -$ OS -$ WS "#ifdef __DECC -$ WS "#include -$ WS "#endif -$ WS "#include -$ WS "int main() -$ WS "{" -$ WS "printf(""%d\n"", sizeof(short)); -$ 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") +$ if (teststatus.nes."1") $ THEN -$ link temp.obj,temp.opt/opt -$ else -$ link temp.obj -$ endif -$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis -$ DEASSIGN SYS$OUTPUT -$ DEASSIGN SYS$ERROR -$ DEFINE SYS$ERROR TEMPOUT -$ DEFINE SYS$OUTPUT TEMPOUT -$ mcr []temp -$ CLOSE TEMPOUT -$ DEASSIGN SYS$OUTPUT -$ DEASSIGN SYS$ERROR -$ OPEN/READ TEMPOUT [-.uu]tempout.lis -$ READ TEMPOUT line -$ CLOSE TEMPOUT -$ -$ perl_shortsize=line -$ WRITE_RESULT "shortsize is ''perl_shortsize'" +$! Okay, gid_t failed. Must be unsigned int +$ perl_gidtype = "unsigned int" +$ ELSE +$ perl_gidtype = "gid_t" +$ ENDIF +$ WRITE_RESULT "Gid_t is ''perl_gidtype'" $! -$! Check for long size +$! Check to see if we've got dev_t $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif $ WS "#include +$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" -$ WS "int foo; -$ WS "foo = sizeof(long); -$ WS "printf(""%d\n"", foo); +$ WS "dev_t foo; $ WS "exit(0); $ WS "}" $ CS @@ -767,40 +791,27 @@ $ 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 -$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis -$ DEASSIGN SYS$OUTPUT -$ DEASSIGN SYS$ERROR -$ DEFINE SYS$ERROR TEMPOUT -$ DEFINE SYS$OUTPUT TEMPOUT -$ mcr []temp -$ CLOSE TEMPOUT +$ teststatus = f$extract(9,1,$status) $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR -$ OPEN/READ TEMPOUT [-.uu]tempout.lis -$ READ TEMPOUT line -$ CLOSE TEMPOUT -$ -$ perl_longsize=line -$ WRITE_RESULT "longsize is ''perl_longsize'" +$ if (teststatus.nes."1") +$ THEN +$! Okay, dev_t failed. Must be unsigned int +$ perl_devtype = "unsigned int" +$ ELSE +$ perl_devtype = "dev_t" +$ ENDIF +$ WRITE_RESULT "Dev_t is ''perl_devtype'" $! -$! Check the prototype for getgid +$! Check to see if we've got unistd.h (which we ought to, but you never know) $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif -$ WS "#include -$ WS "#include $ WS "#include $ WS "int main() $ WS "{" -$ WS "gid_t foo; $ WS "exit(0); $ WS "}" $ CS @@ -814,25 +825,22 @@ $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$! Okay, gid_t failed. Must be unsigned int -$ perl_gidtype = "unsigned int" +$! Okay, failed. Must not have it +$ perl_i_unistd = "undef" $ ELSE -$ perl_gidtype = "gid_t" +$ perl_i_unistd = "define" $ ENDIF -$ WRITE_RESULT "Gid_t is ''perl_gidtype'" +$ WRITE_RESULT "i_unistd is ''perl_i_unistd'" $! -$! Check to see if we've got dev_t +$! Check to see if we've got shadow.h (probably not, but...) $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif -$ WS "#include -$ WS "#include -$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" -$ WS "dev_t foo; $ WS "exit(0); $ WS "}" $ CS @@ -846,20 +854,20 @@ $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$! Okay, dev_t failed. Must be unsigned int -$ perl_devtype = "unsigned int" +$! Okay, failed. Must not have it +$ perl_i_shadow = "undef" $ ELSE -$ perl_devtype = "dev_t" +$ perl_i_shadow = "define" $ ENDIF -$ WRITE_RESULT "Dev_t is ''perl_devtype'" +$ WRITE_RESULT "i_shadow is ''perl_i_shadow'" $! -$! Check to see if we've got unistd.h (which we ought to, but you never know) +$! Check to see if we've got socks.h (probably not, but...) $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif -$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" $ WS "exit(0); @@ -876,16 +884,15 @@ $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN $! Okay, failed. Must not have it -$ perl_i_unistd = "undef" +$ perl_i_socks = "undef" $ ELSE -$ perl_i_unistd = "define" - +$ perl_i_socks = "define" $ ENDIF -$ WRITE_RESULT "i_unistd is ''perl_i_unistd'" +$ 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") +$ IF Has_Dec_C_Sockets .OR. Has_Socketshr $ THEN $ OS $ WS "#ifdef __DECC @@ -894,13 +901,13 @@ $ WS "#endif $ WS "#include $ WS "#include $ WS "#include -$ if ("''Has_Socketshr'".eqs."T") +$ IF Has_Socketshr $ THEN -$ WS "#include " -$ else -$ WS "#include -$ WS "#include -$ endif +$ WS "#include " +$ ELSE +$ WS "#include +$ WS "#include +$ ENDIF $ WS "int main() $ WS "{" $ WS "fd_set *foo; @@ -940,15 +947,15 @@ $ WS "#endif $ WS "#include $ WS "#include $ WS "#include -$ if ("''Has_Socketshr'".eqs."T") +$ IF Has_Socketshr $ THEN -$ WS "#include " +$ WS "#include " $ ENDIF -$ IF ("''Has_Dec_C_Sockets'".eqs."T") +$ IF Has_Dec_C_Sockets $ THEN -$ WS "#include -$ WS "#include -$ endif +$ WS "#include +$ WS "#include +$ ENDIF $ WS "int main() $ WS "{" $ WS "fd_set *foo; @@ -1000,12 +1007,12 @@ $ perl_i_inttypes="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN $ link temp.obj,temp.opt/opt -$ else +$ ELSE $ link temp.obj -$ endif +$ ENDIF $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ DEASSIGN SYS$OUTPUT @@ -1019,6 +1026,53 @@ $ ENDIF $ ENDIF $ WRITE_RESULT "i_inttypes is ''perl_i_inttypes'" $! +$! Check for h_errno +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "h_errno = 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_herrno="undef" +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ ELSE +$ IF Needs_Opt +$ 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_herrno="undef" +$ ELSE +$ perl_d_herrno="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_herrno is ''perl_d_herrno'" +$! $! Check to see if int64_t exists $! $ OS @@ -1049,11 +1103,11 @@ $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN $! Okay, int64_t failed. Must not exist -$ perl_d_int64t = "undef" +$ perl_d_int64_t = "undef" $ ELSE -$ perl_d_int64t="define" +$ perl_d_int64_t="define" $ ENDIF -$ WRITE_RESULT "d_int64t is ''perl_d_int64t'" +$ WRITE_RESULT "d_int64_t is ''perl_d_int64_t'" $! $! Check to see if off64_t exists $! @@ -1085,58 +1139,94 @@ $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN $! Okay, off64_t failed. Must not exist -$ perl_d_off64t = "undef" +$ perl_d_off64_t = "undef" $ ELSE -$ perl_d_off64t="define" +$ perl_d_off64_t="define" $ ENDIF -$ WRITE_RESULT "d_off64t is ''perl_d_off64t'" +$ WRITE_RESULT "d_off64_t is ''perl_d_off64_t'" $! -$! Check to see if gethostname exists +$! Check to see if fpos64_t exists $! -$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T") -$ THEN $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif $ WS "#include $ WS "#include +$ WS "#''perl_i_inttypes IIH +$ WS "#ifdef IIH +$ WS "#include +$ WS "#endif $ WS "#include -$ if ("''Has_Socketshr'".eqs."T") -$ THEN -$ WS "#include " -$ else -$ WS "#include -$ WS "#include -$ endif $ WS "int main() $ WS "{" -$ WS "char name[100]; -$ WS "int bar, baz; -$ WS "bar = 100; -$ WS "baz = gethostname(name, bar); +$ WS "fpos64_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 +$ 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, fpos64_t failed. Must not exist +$ perl_d_fpos64_t = "undef" +$ ELSE +$ perl_d_fpos64_t="define" +$ ENDIF +$ WRITE_RESULT "d_fpos64_t is ''perl_d_fpos64_t'" +$! +$! Check to see if gethostname exists +$! +$ IF (Has_Dec_C_Sockets .OR. Has_Socketshr) +$ THEN +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "#include +$ IF Has_Socketshr +$ THEN +$ WS "#include " +$ ELSE +$ WS "#include +$ WS "#include +$ 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" +$ perl_d_gethname = "undef" $ ELSE -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN $ link temp.obj,temp.opt/opt -$ else +$ ELSE $ link temp.obj -$ endif +$ ENDIF $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ if (teststatus.nes."1") @@ -1179,12 +1269,12 @@ $ perl_i_sysfile="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN $ link temp.obj,temp.opt/opt -$ else +$ ELSE $ link temp.obj -$ endif +$ ENDIF $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ DEASSIGN SYS$OUTPUT @@ -1198,6 +1288,98 @@ $ ENDIF $ ENDIF $ WRITE_RESULT "i_sysfile is ''perl_i_sysfile'" $! +$! Check for sys/utsname.h +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "#include +$ 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_sysutsname="undef" +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ ELSE +$ IF Needs_Opt +$ 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_sysutsname="undef" +$ ELSE +$ perl_i_sysutsname="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "i_sysutsname is ''perl_i_sysutsname'" +$! +$! Check for syslog.h +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "#include +$ 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_syslog="undef" +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ ELSE +$ IF Needs_Opt +$ 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_syslog="undef" +$ ELSE +$ perl_i_syslog="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "i_syslog is ''perl_i_syslog'" +$! $! Check for poll.h $! $ OS @@ -1225,12 +1407,12 @@ $ perl_i_poll="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN $ link temp.obj,temp.opt/opt -$ else +$ ELSE $ link temp.obj -$ endif +$ ENDIF $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ DEASSIGN SYS$OUTPUT @@ -1271,7 +1453,7 @@ $ perl_i_sysuio="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE -$ If (Needs_Opt.eqs."Yes") +$ IF Needs_Opt $ THEN $ link temp.obj,temp.opt/opt $ else @@ -1290,6 +1472,52 @@ $ ENDIF $ ENDIF $ WRITE_RESULT "i_sysuio is ''perl_i_sysuio'" $! +$! Check for sys/mode.h +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "#include +$ 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_sysmode="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_sysmode="undef" +$ ELSE +$ perl_i_sysmode="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "i_sysmode is ''perl_i_sysmode'" +$! $! Check for sys/access.h $! $ OS @@ -1475,17 +1703,17 @@ $ ENDIF $ ENDIF $ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'" $! -$! Check for access +$! Check for memchr $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif -$ WS "#include -$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" -$ WS "access("foo", F_OK); +$ WS "char * place; +$ WS "place = memchr(""foo"", 47, 3) $ WS "exit(0); $ WS "}" $ CS @@ -1498,7 +1726,7 @@ $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ if (teststatus.nes."1") $ THEN -$ perl_d_access="undef" +$ perl_d_memchr="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE @@ -1514,25 +1742,24 @@ $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$ perl_d_access="undef" +$ perl_d_memchr="undef" $ ELSE -$ perl_d_access="define" +$ perl_d_memchr="define" $ ENDIF $ ENDIF -$ WRITE_RESULT "d_access is ''perl_d_access'" +$ WRITE_RESULT "d_memchr is ''perl_d_memchr'" $! -$! Check for bzero +$! Check for strtoull $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif -$ WS "#include -$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" -$ WS "char foo[10]; -$ WS "bzero(foo, 10); +$ WS "unsigned __int64 result; +$ WS "result = strtoull(""123123"", NULL, 10); $ WS "exit(0); $ WS "}" $ CS @@ -1545,7 +1772,7 @@ $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ if (teststatus.nes."1") $ THEN -$ perl_d_bzero="undef" +$ perl_d_strtoull="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE @@ -1561,25 +1788,24 @@ $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$ perl_d_bzero="undef" +$ perl_d_strtoull="undef" $ ELSE -$ perl_d_bzero="define" +$ perl_d_strtoull="define" $ ENDIF $ ENDIF -$ WRITE_RESULT "d_bzero is ''perl_d_bzero'" +$ WRITE_RESULT "d_strtoull is ''perl_d_strtoull'" $! -$! Check for bcopy +$! Check for strtouq $! $ OS $ WS "#ifdef __DECC $ WS "#include $ WS "#endif -$ WS "#include -$ WS "#include +$ WS "#include $ WS "int main() $ WS "{" -$ WS "char foo[10], bar[10]; -$ WS "bcopy(""foo"", bar, 3); +$ WS "unsigned __int64 result; +$ WS "result = strtouq(""123123"", NULL, 10); $ WS "exit(0); $ WS "}" $ CS @@ -1592,7 +1818,7 @@ $ savedstatus = $status $ teststatus = f$extract(9,1,savedstatus) $ if (teststatus.nes."1") $ THEN -$ perl_d_bcopy="undef" +$ perl_d_strtouq="undef" $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ ELSE @@ -1608,14 +1834,499 @@ $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$ perl_d_bcopy="undef" +$ perl_d_strtouq="undef" $ ELSE -$ perl_d_bcopy="define" +$ perl_d_strtouq="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_strtouq is ''perl_d_strtouq'" +$! +$! Check for strtoll +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "__int64 result; +$ WS "result = strtoll(""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_strtoll="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_strtoll="undef" +$ ELSE +$ perl_d_strtoll="define" $ ENDIF $ ENDIF -$ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'" +$ WRITE_RESULT "d_strtoll is ''perl_d_strtoll'" +$! +$! Check for strtold +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "long double result; +$ WS "result = strtold(""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_strtold="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_strtold="undef" +$ ELSE +$ perl_d_strtold="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_strtold is ''perl_d_strtold'" +$! +$! Check for atoll +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ 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 +$ WS "#endif +$ WS "#include +$ 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 +$ 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 "d_atolf is ''perl_d_atolf'" +$! +$! Check for access +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "access("foo", F_OK); +$ 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_access="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_access="undef" +$ ELSE +$ perl_d_access="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_access is ''perl_d_access'" +$! +$! Check for bzero +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "char foo[10]; +$ WS "bzero(foo, 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_bzero="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_bzero="undef" +$ ELSE +$ perl_d_bzero="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_bzero is ''perl_d_bzero'" +$! +$! Check for bcopy +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "char foo[10], bar[10]; +$ WS "bcopy(""foo"", bar, 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_bcopy="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_bcopy="undef" +$ ELSE +$ perl_d_bcopy="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_bcopy is ''perl_d_bcopy'" +$! +$! Check for mkstemp +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "mkstemp(""foo""); +$ 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 +$ savedstatus = $status +$ teststatus = f$extract(9,1,savedstatus) +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ if (teststatus.nes."1") +$ THEN +$ perl_d_mkstemp="undef" +$ ELSE +$ perl_d_mkstemp="define" +$ ENDIF +$ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'" +$! +$! Check for mkstemps +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "mkstemps(""foo"", 1); +$ 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 +$ savedstatus = $status +$ teststatus = f$extract(9,1,savedstatus) +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ if (teststatus.nes."1") +$ THEN +$ perl_d_mkstemps="undef" +$ ELSE +$ perl_d_mkstemps="define" +$ ENDIF +$ WRITE_RESULT "d_mkstemps is ''perl_d_mkstemps'" +$! +$! Check for iconv +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS " iconv_t cd = (iconv_t)0;" +$ WS " char *inbuf, *outbuf;" +$ WS " size_t inleft, outleft;" +$ WS " iconv(cd, &inbuf, &inleft, &outbuf, &outleft);" +$ 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_iconv="undef" +$ perl_i_iconv="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_iconv="undef" +$ perl_i_iconv="undef" +$ ELSE +$ perl_d_iconv="define" +$ perl_i_iconv="define" +$ ENDIF +$ ENDIF +$ WRITE_RESULT "d_iconv is ''perl_d_iconv'" +$ WRITE_RESULT "i_iconv is ''perl_i_iconv'" +$! +$! Check for mkdtemp +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "mkdtemp(""foo""); +$ 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 +$ savedstatus = $status +$ teststatus = f$extract(9,1,savedstatus) +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ if (teststatus.nes."1") +$ THEN +$ perl_d_mkdtemp="undef" +$ ELSE +$ perl_d_mkdtemp="define" +$ ENDIF +$ WRITE_RESULT "d_mkdtemp is ''perl_d_mkdtemp'" $! -$! Check for mkstemp +$! Check for setvbuf $! $ OS $ WS "#ifdef __DECC @@ -1624,7 +2335,10 @@ $ WS "#endif $ WS "#include $ WS "int main() $ WS "{" -$ WS "mkstemp(""foo""); +$ WS "FILE *foo; +$ WS "char Buffer[99]; +$ WS "foo = fopen(""foo"", ""r""); +$ WS "setvbuf(foo, Buffer, 0, 0); $ WS "exit(0); $ WS "}" $ CS @@ -1639,19 +2353,18 @@ $ link temp.obj,temp.opt/opt $ else $ link temp.obj $ endif -$ savedstatus = $status -$ teststatus = f$extract(9,1,savedstatus) +$ teststatus = f$extract(9,1,$status) $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$ perl_d_mkstemp="undef" +$ perl_d_setvbuf="undef" $ ELSE -$ perl_d_mkstemp="define" +$ perl_d_setvbuf="define" $ ENDIF -$ WRITE_RESULT "d_mkstemp is ''perl_d_mkstemp'" +$ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'" $! -$! Check for setvbuf +$! Check for setenv $! $ OS $ WS "#ifdef __DECC @@ -1660,10 +2373,7 @@ $ WS "#endif $ WS "#include $ WS "int main() $ WS "{" -$ WS "FILE *foo; -$ WS "char Buffer[99]; -$ WS "foo = fopen(""foo"", ""r""); -$ WS "setvbuf(foo, Buffer, 0, 0); +$ WS "setenv(""FOO"", ""BAR"", 0); $ WS "exit(0); $ WS "}" $ CS @@ -1671,23 +2381,23 @@ $ DEFINE SYS$ERROR _NLA0: $ DEFINE SYS$OUTPUT _NLA0: $ on error then continue $ on warning then continue -$ 'Checkcc' temp.c +$ 'Checkcc' temp $ If (Needs_Opt.eqs."Yes") $ THEN -$ link temp.obj,temp.opt/opt +$ link temp,temp/opt $ else -$ link temp.obj +$ link temp $ endif $ teststatus = f$extract(9,1,$status) $ DEASSIGN SYS$OUTPUT $ DEASSIGN SYS$ERROR $ if (teststatus.nes."1") $ THEN -$ perl_d_setvbuf="undef" +$ perl_d_setenv="undef" $ ELSE -$ perl_d_setvbuf="define" +$ perl_d_setenv="define" $ ENDIF -$ WRITE_RESULT "d_setvbuf is ''perl_d_setvbuf'" +$ WRITE_RESULT "d_setenv is ''perl_d_setenv'" $! $! Check for $! @@ -1735,6 +2445,52 @@ $ perl_i_niin="undef" $ ENDIF $ WRITE_RESULT "i_niin is ''perl_i_niin'" $! +$! Check for +$! +$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T") +$ THEN +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ if ("''Has_Socketshr'".eqs."T") +$ THEN +$ WS "#include " +$ else +$ WS "#include +$ endif +$ WS "#include " +$ 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") @@ -2287,6 +3043,52 @@ $ perl_d_getsent="undef" $ ENDIF $ WRITE_RESULT "d_getsent is ''perl_d_getsent'" $! +$! Check for socklen_t +$! +$ if ("''Has_Dec_C_Sockets'".eqs."T").or.("''Has_Socketshr'".eqs."T") +$ THEN +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ IF ("''Has_Socketshr'".eqs."T") +$ THEN +$ WS "#include " +$ ELSE +$ WS "#include +$ ENDIF +$ WS "int main() +$ WS "{" +$ WS "socklen_t x = 16; +$ 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_d_socklen_t="undef" +$ ELSE +$ perl_d_socklen_t="define" +$ ENDIF +$ ELSE +$ perl_d_socklen_t="undef" +$ ENDIF +$ WRITE_RESULT "d_socklen_t is ''perl_d_socklen_t'" +$! $! Check for pthread_yield $! $ if ("''use_threads'".eqs."T") @@ -2349,13 +3151,17 @@ $ 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 $! @@ -2372,14 +3178,55 @@ $ WS "printf(""%d\n"", foo); $ 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.c +$ If (Needs_Opt.eqs."Yes") +$ THEN +$ link temp.obj,temp.opt/opt +$ ELSE +$ link temp.obj +$ ENDIF +$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ DEFINE SYS$ERROR TEMPOUT +$ DEFINE SYS$OUTPUT TEMPOUT +$ mcr []temp.exe +$ CLOSE TEMPOUT +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ OPEN/READ TEMPOUT [-.uu]tempout.lis +$ READ TEMPOUT line +$ CLOSE TEMPOUT +$ DELETE/NOLOG [-.uu]tempout.lis; +$ +$ perl_ptrsize=line +$ WRITE_RESULT "ptrsize is ''perl_ptrsize'" +$! +$! Check for size_t size $! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "int foo; +$ WS "foo = sizeof(size_t); +$ WS "printf(""%d\n"", foo); +$ 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") +$ If Needs_Opt $ THEN $ link temp.obj,temp.opt/opt $ else @@ -2397,9 +3244,79 @@ $ DEASSIGN SYS$ERROR $ OPEN/READ TEMPOUT [-.uu]tempout.lis $ READ TEMPOUT line $ CLOSE TEMPOUT +$ DELETE/NOLOG [-.uu]tempout.lis; $ -$ perl_ptrsize=line -$ WRITE_RESULT "ptrsize is ''perl_ptrsize'" +$ perl_sizesize=line +$ WRITE_RESULT "sizesize is ''perl_sizesize'" +$! +$! Check rand48 and its ilk +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "srand48(12L);" +$ 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/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 +$ WS "#endif +$ WS "#include +$ 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. @@ -2417,11 +3334,12 @@ $ THEN $ perl_d_attribut="define" $ perl_vms_cc_type="gcc" $ ELSE +$ perl_vms_cc_type="cc" $ perl_d_attribut="undef" $ ENDIF $ $! Dec C >= 5.2 and VMS ver >= 7.0 -$ IF ("''Using_Dec_C'".EQS."Yes").AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.("''VMS_VER'".GES."7.0") +$ IF (Using_Dec_C).AND.(F$INTEGER(Dec_C_Version).GE.50200000).AND.(VMS_VER .GES. "7.0") $ THEN $ perl_d_bcmp="define" $ perl_d_gettimeod="define" @@ -2504,13 +3422,6 @@ $ perl_d_locconv="undef" $ perl_d_setlocale="undef" $ ENDIF $! -$! Vax C stuff -$ if ("''Using_Vax_C'".EQS."Yes") -$ THEN -$ perl_vms_cc_type="vaxc" -$ ENDIF -$! -$! $! Sockets? $ if ("''Has_Socketshr'".EQS."T").OR.("''Has_Dec_C_Sockets'".EQS."T") $ THEN @@ -2534,6 +3445,12 @@ $ perl_d_gethostprotos="define" $ perl_d_getnetprotos="define" $ perl_d_getprotoprotos="define" $ perl_d_getservprotos="define" +$ IF ("''Using_Dec_C'".EQS."Yes") +$ THEN +$ perl_socksizetype="unsigned int" +$ ELSE +$ perl_socksizetype="int *" +$ ENDIF $ ELSE $ perl_d_vms_do_sockets="undef" $ perl_d_htonl="undef" @@ -2555,13 +3472,14 @@ $ perl_d_gethostprotos="undef" $ perl_d_getnetprotos="undef" $ perl_d_getprotoprotos="undef" $ perl_d_getservprotos="undef" +$ perl_socksizetype="undef" $ ENDIF $! Threads -$ if ("''use_threads'".eqs."T") +$ IF use_threads $ THEN $ perl_usethreads="define" $ perl_d_pthreads_created_joinable="define" -$ if ("''VMS_VER'".ges."7.0") +$ if (VMS_VER .GES. "7.0") $ THEN $ perl_d_oldpthreads="undef" $ ELSE @@ -2574,46 +3492,199 @@ $ $ perl_d_pthreads_created_joinable="undef" $ ENDIF $! +$! new (5.005_62++) typedefs for primitives +$! +$ perl_ivtype="long" +$ perl_uvtype="unsigned long" +$ perl_i8type="char" +$ perl_u8type="unsigned char" +$ perl_i16type="short" +$ perl_u16type="unsigned short" +$ perl_i32type="int" +$ perl_u32type="unsigned int" +$ perl_i64type="long long" +$ perl_u64type="unsigned long long" +$ perl_nvtype="double" +$! +$ GOTO beyond_type_size_check +$! +$type_size_check: +$! +$! Check for type sizes +$! +$ OS +$ WS "#ifdef __DECC +$ WS "#include +$ WS "#endif +$ WS "#include +$ WS "int main() +$ WS "{" +$ WS "printf(""%d\n"", sizeof(''type'));" +$ 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 +$ OPEN/WRITE TEMPOUT [-.uu]tempout.lis +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ DEFINE SYS$ERROR TEMPOUT +$ DEFINE SYS$OUTPUT TEMPOUT +$ mcr []temp.exe +$ CLOSE TEMPOUT +$ DEASSIGN SYS$OUTPUT +$ DEASSIGN SYS$ERROR +$ OPEN/READ TEMPOUT [-.uu]tempout.lis +$ READ TEMPOUT line +$ CLOSE TEMPOUT +$ DELETE/NOLOG [-.uu]tempout.lis; +$ WRITE_RESULT "''size_name' is ''line'" +$ DS +$ RETURN +$! +$beyond_type_size_check: +$! +$ line = "" +$ type = "''perl_ivtype'" +$ size_name = "ivsize" +$ gosub type_size_check +$ perl_ivsize="''line'" +$ IF type .eqs. "long" +$ THEN perl_longsize = "''line'" +$ ELSE +$ type = "long" +$ size_name = "longsize" +$ gosub type_size_check +$ perl_longsize="''line'" +$ ENDIF +$ +$ type = "''perl_uvtype'" +$ size_name = "uvsize" +$ gosub type_size_check +$ perl_uvsize="''line'" +$ +$ type = "''perl_i8type'" +$ size_name = "i8size" +$ gosub type_size_check +$ perl_i8size="''line'" +$ +$ type = "''perl_u8type'" +$ size_name = "u8size" +$ gosub type_size_check +$ perl_u8size="''line'" +$ +$ type = "''perl_i16type'" +$ size_name = "i16size" +$ gosub type_size_check +$ perl_i16size="''line'" +$ IF type .eqs. "short" +$ THEN perl_shortsize="''line'" +$ ELSE +$ type = "''perl_i16type'" +$ size_name = "shortsize" +$ gosub type_size_check +$ perl_shortsize="''line'" +$ ENDIF +$ +$ type = "''perl_u16type'" +$ size_name = "u16size" +$ gosub type_size_check +$ perl_u16size="''line'" +$ +$ type = "''perl_i32type'" +$ size_name = "i32size" +$ gosub type_size_check +$ perl_i32size="''line'" +$ IF type .eqs. "int" +$ THEN perl_intsize="''perl_i32size'" +$ ELSE +$ type = "int" +$ size_name = "intsize" +$ gosub type_size_check +$ perl_intsize="''line'" +$ ENDIF +$ +$ type = "''perl_u32type'" +$ size_name = "u32size" +$ gosub type_size_check +$ perl_u32size="''line'" +$ +$ If use64bitint +$ Then +$ type = "''perl_i64type'" +$ size_name = "i64size" +$ gosub type_size_check +$ perl_i64size="''line'" +$ perl_ivtype="''perl_i64type'" +$ +$ type = "''perl_u64type'" +$ size_name = "u64size" +$ gosub type_size_check +$ perl_u64size="''line'" +$ perl_uvtype="''perl_u64type'" +$ perl_nvtype="long double" +$ Else +$ perl_i64size="undef" +$ perl_u64size="undef" +$ EndIf +$! +$ perl_ivdformat="""ld""" +$ perl_uvuformat="""lu""" +$ perl_uvoformat="""lo""" +$ perl_uvxformat="""lx""" $! $! Finally the composite ones. All config -$ perl_installarchlib="''perl_prefix':[lib.''perl_arch'.''localperlver']" -$ perl_installsitearch="''perl_prefix':[lib.site_perl.''perl_arch']" +$ perl_installarchlib="''perl_prefix':[lib.''archname'.''version']" +$ perl_installsitearch="''perl_prefix':[lib.site_perl.''archname']" $ perl_myhostname="''myhostname'" $ perl_mydomain="''mydomain'" $ perl_perladmin="''perladmin'" -$ perl_cf_email="''cf_email'" -$ perl_myuname:="VMS ''myname' ''f$edit(perl_osvers, "TRIM")' ''f$edit(hwname, "TRIM")'" -$ perl_archlibexp="''perl_prefix':[lib.''perl_arch'.''localperlver']" -$ perl_archlib="''perl_prefix':[lib.''perl_arch'.''lovalperlver']" -$ perl_oldarchlibexp="''perl_prefix':[lib.''perl_arch']" -$ perl_oldarchlib="''perl_prefix':[lib.''perl_arch']" -$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''perl_arch']" -$ perl_sitearch="''perl_prefix':[lib.site_perl.''perl_arch']" -$ if "''Using_Dec_C'" .eqs. "Yes" +$ perl_myuname:="''osname' ''myname' ''osvers' ''f$edit(hwname, "TRIM")'" +$ perl_archlibexp="''perl_prefix':[lib.''archname'.''version']" +$ perl_archlib="''perl_prefix':[lib.''archname'.''version']" +$ perl_oldarchlibexp="''perl_prefix':[lib.''archname']" +$ perl_oldarchlib="''perl_prefix':[lib.''archname']" +$ perl_sitearchexp="''perl_prefix':[lib.site_perl.''archname']" +$ perl_sitearch="''perl_prefix':[lib.site_perl.''archname']" +$ IF Using_Dec_C $ THEN $ perl_ccflags="/Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=''perl_obj_ext'/NoList''cc_flags'" -$ ELSE -$ IF "''Using_Vax_C'" .eqs. "Yes" -$ THEN -$ perl_ccflags="/Include=[]/Obj=''perl_obj_ext'/NoList''cc_flags'" -$ ENDIF $ ENDIF -$! -$! Finally clean off any leading zeros from the patchlevel or subversion -$ perl_patchlevel = perl_patchlevel + 0 -$ perl_subversion = perl_subversion + 0 +$ if use_vmsdebug_perl .eqs. "Y" +$ then +$ perl_optimize="/Debug/NoOpt" +$ perl_dbgprefix = "DBG" +$ else +$ perl_optimize= "" +$ perl_dbgprefix = "" +$ endif $! $! Okay, we've got everything configured. Now go write out a config.sh. -$ open/write CONFIGSH [-]config.sh -$ WC := "write CONFIGSH" +$ echo4 "Creating config.sh..." +$ open/write CONFIG [-]config.sh +$ WC := "write CONFIG" $! $ WC "# This file generated by Configure.COM on a VMS system." -$ WC "# Time: " + perl_cf_time +$ WC "# Time: " + cf_time $ WC "" +$ WC "CONFIGDOTSH=true" $ WC "package='" + perl_package + "'" +$ WC "config_args='" + config_args + "'" +$ WC "d_nv_preserves_uv='" + perl_d_nv_preserves_uv + "'" +$ WC "use5005threads='" + perl_use5005threads + "'" +$ WC "useithreads='" + perl_useithreads + "'" $ WC "CONFIG='" + perl_config + "'" -$ WC "cf_time='" + perl_cf_time + "'" -$ WC "cf_by='" + perl_cf_by+ "'" +$ WC "cf_time='" + cf_time + "'" +$ WC "cf_by='" + cf_by + "'" $ WC "cpp_stuff='" + perl_cpp_stuff + "'" $ WC "ccdlflags='" + perl_ccdlflags + "'" $ WC "cccdlflags='" + perl_cccdlflags + "'" @@ -2623,6 +3694,7 @@ $ WC "ld='" + perl_ld + "'" $ WC "lddlflags='" + perl_lddlflags + "'" $ WC "ranlib='" + perl_ranlib + "'" $ WC "ar='" + perl_ar + "'" +$ WC "full_ar='" + perl_full_ar + "'" $ WC "eunicefix='" + perl_eunicefix + "'" $ WC "hint='" + perl_hint +"'" $ WC "hintfile='" + perl_hintfile + "'" @@ -2635,9 +3707,8 @@ $ WC "dlsrc='dl_vms.c'" $ WC "binexp='" + perl_binexp + "'" $ WC "man1ext='" + perl_man1ext + "'" $ WC "man3ext='" + perl_man3ext + "'" -$ WC "arch='" + perl_arch + "'" -$ WC "archname='" + perl_archname + "'" -$ WC "osvers='" + perl_osvers + "'" +$ WC "archname='" + archname + "'" +$ WC "osvers='" + osvers + "'" $ WC "prefix='" + perl_prefix + "'" $ WC "builddir='" + perl_builddir + "'" $ WC "installbin='" + perl_installbin + "'" @@ -2653,13 +3724,17 @@ $ 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 + "'" $ WC "d_gethent='" + perl_d_gethent + "'" $ WC "d_getsent='" + perl_d_getsent + "'" +$ WC "d_socklen_t='" + perl_d_socklen_t + "'" $ 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 + "'" @@ -2686,17 +3761,19 @@ $ WC "lib_ext='" + perl_lib_ext + "'" $ WC "myhostname='" + perl_myhostname + "'" $ WC "mydomain='" + perl_mydomain + "'" $ WC "perladmin='" + perl_perladmin + "'" -$ WC "cf_email='" + perl_cf_email + "'" +$ WC "cf_email='" + cf_email + "'" $ WC "myuname='" + perl_myuname + "'" -$ WC "alignbytes='" + perl_alignbytes + "'" +$ WC "alignbytes='" + alignbytes + "'" $ WC "osname='" + perl_osname + "'" $ WC "d_archlib='" + perl_d_archlib + "'" $ WC "archlibexp='" + perl_archlibexp + "'" $ WC "archlib='" + perl_archlib + "'" -$ WC "archname='" + perl_archname + "'" +$ WC "archname='" + archname + "'" $ WC "d_bincompat3='" + perl_d_bincompat3 + "'" $ WC "cppstdin='" + perl_cppstdin + "'" $ WC "cppminus='" + perl_cppminus + "'" +$ WC "cpprun='" + perl_cpprun + "'" +$ WC "cpplast='" + perl_cpplast + "'" $ WC "d_bcmp='" + perl_d_bcmp + "'" $ WC "d_bcopy='" + perl_d_bcopy + "'" $ WC "d_bzero='" + perl_d_bzero + "'" @@ -2719,6 +3796,7 @@ $ WC "d_fsetpos='" + perl_d_fsetpos + "'" $ WC "d_gettimeod='" + perl_d_gettimeod + "'" $ WC "d_getgrps='" + perl_d_getgrps + "'" $ WC "d_setgrps='" + perl_d_setgrps + "'" +$ WC "groupstype='" + perl_groupstype + "'" $ WC "d_uname='" + perl_d_uname + "'" $ WC "d_getprior='" + perl_d_getprior + "'" $ WC "d_killpg='" + perl_d_killpg + "'" @@ -2752,6 +3830,7 @@ $ WC "d_setruid='" + perl_d_setruid + "'" $ WC "d_setsid='" + perl_d_setsid + "'" $ WC "d_shm='" + perl_d_shm + "'" $ WC "d_shmatprototype='" + perl_d_shmatprototype + "'" +$ WC "shmattype='" + perl_shmattype + "'" $ WC "d_sigaction='" + perl_d_sigaction + "'" $ WC "d_statblks='" + perl_d_statblks + "'" $ WC "stdio_ptr='" + perl_stdio_ptr + "'" @@ -2820,6 +3899,7 @@ $ WC "i_vfork='" + perl_i_vfork + "'" $ WC "prototype='" + perl_prototype + "'" $ WC "randbits='" + perl_randbits +"'" $ WC "selecttype='" + perl_selecttype + "'" +$ WC "selectminbits='" + perl_selectminbits + "'" $ WC "stdchar='" + perl_stdchar + "'" $ WC "d_unlink_all_versions='" + perl_d_unlink_all_versions + "'" $ WC "full_sed='" + perl_full_sed + "'" @@ -2831,6 +3911,7 @@ $ WC "d_chown='" + perl_d_chown + "'" $ WC "d_chroot='" + perl_d_chroot + "'" $ WC "d_cuserid='" + perl_d_cuserid + "'" $ WC "d_dbl_dig='" + perl_d_dbl_dig + "'" +$ WC "d_ldbl_dig='" + perl_d_ldbl_dig + "'" $ WC "d_difftime='" + perl_d_difftime + "'" $ WC "d_fork='" + perl_d_fork + "'" $ WC "d_getlogin='" + perl_d_getlogin + "'" @@ -2859,6 +3940,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 + "'" @@ -2881,6 +3963,7 @@ $ WC "privlibexp='" + perl_privlibexp + "'" $ WC "privlib='" + perl_privlib + "'" $ WC "sitelibexp='" + perl_sitelibexp + "'" $ WC "sitelib='" + perl_sitelib + "'" +$ WC "sitelib_stem='" + perl_sitelib_stem + "'" $ WC "sitearchexp='" + perl_sitearchexp + "'" $ WC "sitearch='" + perl_sitearch + "'" $ WC "sizetype='" + perl_sizetype + "'" @@ -2891,6 +3974,7 @@ $ WC "d_dlsymun='" + perl_d_dlsymun + "'" $ WC "d_suidsafe='" + perl_d_suidsafe + "'" $ WC "d_dosuid='" + perl_d_dosuid + "'" $ WC "d_inetaton='" + perl_d_inetaton + "'" +$ WC "d_int64_t='" + perl_d_int64_t + "'" $ WC "d_isascii='" + perl_d_isascii + "'" $ WC "d_mkfifo='" + perl_d_mkfifo + "'" $ WC "d_pathconf='" + perl_d_pathconf + "'" @@ -2921,13 +4005,17 @@ $ WC "voidflags='" + perl_voidflags + "'" $ WC "d_eunice='" + perl_d_eunice + "'" $ WC "libs='" + perl_libs + "'" $ WC "libc='" + perl_libc + "'" -$ tempstring = "PATCHLEVEL='" + "''perl_patchlevel'" + "'" -$ WC tempstring -$ tempstring = "SUBVERSION='" + "''perl_SUBVERSION'" + "'" -$ WC tempstring +$ WC "xs_apiversion='" + version + "'" +$ WC "pm_apiversion='" + version + "'" +$ WC "PERL_VERSION='" + patchlevel + "'" +$ WC "PERL_SUBVERSION='" + subversion + "'" $ WC "pager='" + perl_pager + "'" $ WC "uidtype='" + perl_uidtype + "'" +$ WC "uidformat='" + perl_uidformat + "'" +$ WC "uidsize='" + perl_uidsize + "'" $ WC "gidtype='" + perl_gidtype + "'" +$ WC "gidformat='" + perl_gidformat + "'" +$ WC "gidsize='" + perl_gidsize + "'" $ WC "usethreads='" + perl_usethreads + "'" $ WC "d_pthread_yield='" + perl_d_pthread_yield + "'" $ WC "d_pthreads_created_joinable='" + perl_d_pthreads_created_joinable + "'" @@ -2938,6 +4026,7 @@ $ WC "netdb_host_type='" + perl_netdb_host_type + "'" $ WC "netdb_hlen_type='" + perl_netdb_hlen_type + "'" $ WC "netdb_name_type='" + perl_netdb_name_type + "'" $ WC "netdb_net_type='" + perl_netdb_net_type + "'" +$ WC "socksizetype='" + perl_socksizetype + "'" $ WC "baserev='" + perl_baserev + "'" $ WC "doublesize='" + perl_doublesize + "'" $ WC "ptrsize='" + perl_ptrsize + "'" @@ -2956,7 +4045,10 @@ $ WC "longdblsize='" + perl_longdblsize + "'" $ WC "d_longlong='" + perl_d_longlong + "'" $ WC "longlongsize='" + perl_longlongsize + "'" $ WC "d_mkstemp='" + perl_d_mkstemp + "'" +$ WC "d_mkstemps='" + perl_d_mkstemps + "'" +$ WC "d_mkdtemp='" + perl_d_mkdtemp + "'" $ 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 + "'" @@ -2990,12 +4082,18 @@ $ WC "d_endpwent='" + perl_d_endpwent + "'" $ WC "d_semctl_semun='" + perl_d_semctl_semun + "'" $ WC "d_semctl_semid_ds='" + perl_d_semctl_semid_ds + "'" $ WC "extensions='" + perl_extensions + "'" +$ WC "known_extensions='" + perl_known_extensions + "'" +$ WC "static_ext='" + "'" +$ WC "dynamic_ext='" + 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 "aphostname='" + perl_aphostname + "'" $ WC "d_accessx='" + perl_d_accessx + "'" $ WC "d_eaccess='" + perl_d_eaccess + "'" +$ WC "i_ieeefp='" + perl_i_ieeefp + "'" +$ WC "i_sunmath='" + perl_i_sunmath + "'" $ WC "i_sysaccess='" + perl_i_sysaccess + "'" $ WC "i_syssecrt='" + perl_i_syssecrt + "'" $ WC "d_fd_set='" + perl_d_fd_set + "'" @@ -3013,63 +4111,141 @@ $ 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_qgcvt='" + perl_d_qgcvt + "'" $ 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_off64t='" + perl_d_off64t + "'" -$ 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_off64_t='" + perl_d_off64_t + "'" +$ WC "d_fpos64_t='" + perl_d_fpos64_t + "'" +$ WC "use64bitall='" + perl_use64bitall + "'" +$ WC "use64bitint='" + perl_use64bitint + "'" $ WC "d_drand48proto='" + perl_d_drand48proto + "'" -$ WC "d_pthread_create_joinable='" + perl_d_pthread_create_joinable + "'" -$ WC "pthread_create_joinable='" + perl_pthread_create_joinable + "'" +$ WC "d_lseekproto='" + 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_getfsstat='" + perl_d_getfsstat + "'" +$ 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 "stdio_stream_array='" + perl_stdio_stream_array + "'" $ WC "i_sysstatvfs='" + perl_i_sysstatvfs + "'" +$ WC "i_syslog='" + perl_i_syslog + "'" +$ WC "i_sysmode='" + perl_i_sysmode + "'" +$ WC "i_sysutsname='" + perl_i_sysutsname + "'" +$ 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 "mmaptype='" + perl_mmaptype + "'" +$ 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 "d_strtouq='" + perl_d_strtouq + "'" +$ WC "d_strtoll='" + perl_d_strtoll + "'" +$ WC "d_strtold='" + perl_d_strtold + "'" +$ WC "usesocks='" + perl_usesocks + "'" +$ WC "d_vendorlib='" + perl_d_vendorlib + "'" +$ WC "vendorlibexp='" + perl_vendorlibexp + "'" +$ WC "vendorlib_stem='" + perl_vendorlib_stem + "'" +$ 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 + "'" +$ WC "d_llseek='" + perl_d_llseek + "'" +$ WC "d_iconv='" + perl_d_iconv +"'" +$ WC "i_iconv='" + perl_i_iconv +"'" +$ WC "inc_version_list='0'" +$ WC "inc_version_list_init='0'" +$ WC "uselargefiles='" + perl_uselargefiles + "'" +$ WC "uselongdouble='" + perl_uselongdouble + "'" +$ WC "usemorebits='" + perl_usemorebits + "'" +$ WC "d_quad='" + perl_d_quad + "'" +$ WC "quadtype='" + perl_quadtype + "'" +$ WC "uquadtype='" + perl_uquadtype + "'" +$ WC "quadkind='" + perl_quadkind + "'" +$ WC "d_fs_data_s='" + perl_d_fs_data_s + "'" +$ WC "d_getcwd='" + perl_d_getcwd + "'" +$ WC "d_getmnt='" + perl_d_getmnt + "'" +$ WC "d_sqrtl='" + perl_d_sqrtl + "'" +$ WC "d_statfs_f_flags='" + perl_d_statfs_f_flags + "'" +$ WC "d_statfs_s='" + perl_d_statfs_s + "'" +$ WC "d_ustat='" + perl_d_ustat + "'" +$ WC "d_vendorarch='" + perl_d_vendorarch + "'" +$ WC "vendorarchexp='" + perl_vendorarchexp + "'" +$ WC "i_sysstatfs='" + perl_i_sysstatfs + "'" +$ WC "i_sysvfs='" + perl_i_sysvfs + "'" +$ WC "i_ustat='" + perl_i_ustat + "'" +$ WC "ivtype='" + perl_ivtype + "'" +$ WC "uvtype='" + perl_uvtype + "'" +$ WC "i8type='" + perl_i8type + "'" +$ WC "i16type='" + perl_i16type + "'" +$ WC "u8type='" + perl_u8type + "'" +$ WC "u16type='" + perl_u16type + "'" +$ WC "i32type='" + perl_i32type + "'" +$ WC "u32type='" + perl_u32type + "'" +$ WC "i64type='" + perl_i64type + "'" +$ WC "u64type='" + perl_u64type + "'" +$ WC "nvtype='" + perl_nvtype + "'" +$ WC "ivsize='" + perl_ivsize + "'" +$ WC "uvsize='" + perl_uvsize + "'" +$ WC "i8size='" + perl_i8size + "'" +$ WC "u8size='" + perl_u8size + "'" +$ WC "i16size='" + perl_i16size + "'" +$ WC "u16size='" + perl_u16size + "'" +$ WC "i32size='" + perl_i32size + "'" +$ WC "u32size='" + perl_u32size + "'" +$ WC "i64size='" + perl_i64size + "'" +$ WC "u64size='" + perl_u64size + "'" +$ WC "ivdformat='" + perl_ivdformat + "'" +$ WC "uvuformat='" + perl_uvuformat + "'" +$ WC "uvoformat='" + perl_uvoformat + "'" +$ WC "uvxformat='" + perl_uvxformat + "'" +$ WC "d_vms_case_sensitive_symbols='" + d_vms_be_case_sensitive + "'" +$ WC "sizesize='" + perl_sizesize + "'" $! $! ##WRITE NEW CONSTANTS HERE## $! -$ Close CONFIGSH +$ Close CONFIG $ $! Okay, we've gotten here. Build munchconfig and run it $ 'Perl_CC' munchconfig.c @@ -3087,7 +4263,9 @@ $ delete munchconfig.opt;* $ else $ link munchconfig.obj $ endif -$ WRITE_RESULT "Writing config.h" +$ echo "" +$ echo "Doing variable substitutions on .SH files..." +$ echo "Extracting config.h (with variable substitutions)" $ ! $ ! we need an fdl file $ CREATE [-]CONFIG.FDL @@ -3097,43 +4275,36 @@ $ CREATE /FDL=[-]CONFIG.FDL [-]CONFIG.LOCAL $ ! First spit out the header info with the local defines (to get $ ! around the 255 character command line limit) $ OPEN/APPEND CONFIG [-]config.local -$ 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" -$ endif -$ if mymalloc.eqs."Y" -$ THEN -$ WRITE CONFIG "#define EMBEDMYMALLOC" -$ ENDIF -$ if use_pack_malloc.eqs."Y" -$ THEN -$ WRITE CONFIG "#define PACK_MALLOC" -$ endif -$ if use_debugmalloc.eqs."Y" -$ THEN -$ write config "#define DEBUGGING_MSTATS" -$ ENDIF -$ if "''Using_Gnu_C'" .eqs."Yes" +$ IF use_debugging_perl THEN WC "#define DEBUGGING" +$ IF use_two_pot_malloc THEN WC "#define TWO_POT_OPTIMIZE" +$ IF mymalloc THEN WC "#define EMBEDMYMALLOC" +$ IF use_pack_malloc THEN WC "#define PACK_MALLOC" +$ IF use_debugmalloc THEN WC "#define DEBUGGING_MSTATS" +$ IF Using_Gnu_C THEN WC "#define GNUC_ATTRIBUTE_CHECK" +$ IF (Has_Dec_C_Sockets) $ THEN -$ WRITE CONFIG "#define GNUC_ATTRIBUTE_CHECK" +$ WC "#define VMS_DO_SOCKETS" +$ WC "#define DECCRTL_SOCKETS" +$ ELSE +$ IF Has_Socketshr THEN WC "#define VMS_DO_SOCKETS" $ ENDIF -$ if "''Has_Dec_C_Sockets'".eqs."T" +$! This is VMS-specific for now +$ WC "#''perl_d_setenv' HAS_SETENV" +$ IF d_secintgenv THEN WC "#define SECURE_INTERNAL_GETENV" +$ if d_alwdeftype THEN WC "#define ALWAYS_DEFTYPES" +$ IF (use64bitint) $ THEN -$ WRITE CONFIG "#define VMS_DO_SOCKETS" -$ WRITE CONFIG "#define DECCRTL_SOCKETS" +$ WC "#define USE_64_BIT_INT" +$ WC "#define USE_LONG_DOUBLE" $ ENDIF -$ if "''Has_Socketshr'".eqs."T" +$ IF use64bitall THEN WC "#define USE_64_BIT_ALL" +$ IF be_case_sensitive THEN WC "#define VMS_WE_ARE_CASE_SENSITIVE" +$ if perl_d_herrno .eqs. "undef" $ THEN -$ WRITE CONFIG "#define VMS_DO_SOCKETS" +$ WC "#define NEED_AN_H_ERRNO" $ ENDIF +$ WC "#define HAS_ENVGETENV" +$ WC "#define PERL_EXTERNAL_GLOB" $ CLOSE CONFIG $! $! Now build the normal config.h @@ -3146,32 +4317,32 @@ $ DELETE/NOLOG [-]CONFIG.MAIN;* $ DELETE/NOLOG [-]CONFIG.LOCAL;* $ DELETE/NOLOG [-]CONFIG.FDL;* $! -$ if "''Using_Dec_C'" .eqs."Yes" +$ IF Using_Dec_C $ THEN -$ DECC_REPLACE = "DECC=decc=1" +$ DECC_REPLACE = "DECC=decc=1" $ ELSE -$ DECC_REPLACE = "DECC=" +$ DECC_REPLACE = "DECC=" $ ENDIF -$ if "''Using_Gnu_C'" .eqs."Yes" +$ IF Using_Gnu_C $ THEN -$ GNUC_REPLACE = "GNUC=gnuc=1" +$ GNUC_REPLACE = "GNUC=gnuc=1" $ ELSE -$ GNUC_REPLACE = "GNUC=" +$ GNUC_REPLACE = "GNUC=" $ ENDIF -$ if "''Has_Dec_C_Sockets'" .eqs."T" +$ IF Has_Dec_C_Sockets $ THEN $ SOCKET_REPLACE = "SOCKET=DECC_SOCKETS=1" $ ELSE -$ if "''Has_Socketshr'" .eqs."T" +$ IF Has_Socketshr $ THEN $ SOCKET_REPLACE = "SOCKET=SOCKETSHR_SOCKETS=1" $ ELSE $ SOCKET_REPLACE = "SOCKET=" $ ENDIF $ ENDIF -$ IF ("''Use_Threads'".eqs."T") +$ IF (Use_Threads) $ THEN -$ if ("''VMS_VER'".LES."6.2") +$ IF (VMS_VER .LES. "6.2") $ THEN $ THREAD_REPLACE = "THREAD=OLDTHREADED=1" $ ELSE @@ -3180,24 +4351,76 @@ $ ENDIF $ ELSE $ THREAD_REPLACE = "THREAD=" $ ENDIF -$ if mymalloc.eqs."Y" +$ IF mymalloc $ THEN $ MALLOC_REPLACE = "MALLOC=MALLOC=1" $ ELSE $ MALLOC_REPLACE = "MALLOC=" $ ENDIF -$ if f$getsyi("HW_MODEL").ge.1024 -$ THEN -$ ARCH_TYPE = "ARCH-TYPE=__AXP__" -$ ELSE -$ ARCH_TYPE = "ARCH-TYPE=__VAX__" -$ ENDIF -$ WRITE_RESULT "Writing DESCRIP.MMS" +$ echo "Extracting ''defmakefile' (with variable substitutions)" $!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'" "PV=''LocalPerlVer'" +$ define/user sys$output 'UUmakefile +$ 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=''version'" "FLAGS=FLAGS=''extra_flags'" +$ echo "Extracting Build_Ext.Com (without variable substitutions)" +$ Create Sys$Disk:[-]Build_Ext.Com +$ Deck/Dollar="$EndOfTpl$" +$!++ Build_Ext.Com +$! NOTE: This file 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; + $extdir =~ 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 -$ delete/nolog munchconfig.exe;* -$ delete/nolog munchconfig.obj;* +$ DELETE/NOLOG/NOCONFIRM munchconfig.exe; +$ DELETE/NOLOG/NOCONFIRM munchconfig.obj;