$ WRITE CONFIG "}"
$ CLOSE CONFIG
$!
-$! DEFINE SYS$ERROR _NLA0:
-$! DEFINE SYS$OUTPUT _NLA0:
+$ SET NOON
+$ DEFINE/USER_MODE SYS$ERROR _NLA0:
+$ DEFINE/USER_MODE SYS$OUTPUT _NLA0:
$ cc/NoObj/list=ccvms.lis ccvms.c
$ tmp = $status
-$! DEASSIGN SYS$OUTPUT
-$! DEASSIGN SYS$ERROR
+$ SET ON
$ IF (silent) THEN GOSUB Shut_up
$ IF tmp.NE.%X10B90001
$ THEN
$ THEN
$ echo "Will try cc/decc..."
$ ENDIF
+$ SET NOON
$ DEFINE/USER_MODE SYS$ERROR NL:
$ DEFINE/USER_MODE SYS$OUTPUT NL:
-$ SET NOON
$ cc/decc/NoObj/list=ccvms.lis ccvms.c
$ tmp = $status
$ SET ON
$Gcc_initial_check:
$ echo "Checking for gcc"
$ OPEN/WRITE CONFIG gccvers.lis
+$ SET NOON
$ DEFINE/USER_MODE SYS$ERROR CONFIG
$ DEFINE/USER_MODE SYS$OUTPUT CONFIG
$ 'gcc_symbol'/noobj/version _nla0:
$ tmp = $status
+$ SET ON
$ IF (silent) THEN GOSUB Shut_up
$ CLOSE CONFIG
$ IF (tmp.NE.%X10000001).and.(tmp.ne.%X00030001)
$ bool_dflt = "y"
$ if f$type(useithreads) .nes. ""
$ then
-$ if .not. useithreads .or. useithreads .eqs. "undef" then bool_dflt="n"
+$ if useithreads .eqs. "undef" then bool_dflt="n"
$ endif
$ if f$type(use5005threads) .nes. ""
$ then
$ THEN
$ dflt = dflt - "Socket" ! optional on VMS
$ ENDIF
-$ IF .NOT. use_ithreads THEN dflt = dflt - "threads/shared"
-$ IF .NOT. use_ithreads THEN dflt = dflt - "threads"
$ IF .NOT. use_threads THEN dflt = dflt - "Thread"
$ dflt = F$EDIT(dflt,"TRIM,COMPRESS")
$!
$ d_isnan = "define"
$ d_isnanl = "define"
$ d_modfl = "define"
+$ d_modflproto = "define"
$ ELSE
$ d_PRId64 = "undef"
$ d_PRIXU64 = "undef"
$ d_isnan = "undef"
$ d_isnanl = "undef"
$ d_modfl = "undef"
+$ d_modflproto = "undef"
$ ENDIF
$!
$! Now some that we build up
$ GOSUB inhdr
$ i_unistd = tmp
$!
+$! do we have getppid()?
+$!
+$ IF i_unistd .EQS. "define"
+$ THEN
+$ OS
+$ WS "#include <stdio.h>"
+$ WS "#include <unistd.h>"
+$ WS "int main() {"
+$ WS "printf(""%d\n"",getppid());"
+$ WS "return(0);"
+$ WS "}"
+$ CS
+$ tmp = "getppid"
+$ GOSUB inlibc
+$ d_getppid = tmp
+$ ELSE
+$ d_getppid = "undef"
+$ ENDIF
+$!
$!: see if this is a libutil.h system
$!
$ tmp = "libutil.h"
$ WC "d_getpgid='undef'"
$ WC "d_getpgrp2='undef'"
$ WC "d_getpgrp='undef'"
-$ WC "d_getppid='undef'"
+$ WC "d_getppid='" + d_getppid + "'"
$ WC "d_getprior='undef'"
$ WC "d_getprotoprotos='" + d_getprotoprotos + "'"
$ WC "d_getprpwnam='undef'"
$ WC "d_mktime='" + d_mktime + "'"
$ WC "d_mmap='" + d_mmap + "'"
$ WC "d_modfl='" + d_modfl + "'"
+$ WC "d_modflproto='" + d_modflproto + "'"
$ WC "d_modfl_pow32_bug='undef'"
$ WC "d_mprotect='" + d_mprotect + "'"
$ WC "d_msg='undef'"
$ WC "d_unordered='undef'"
$ WC "d_usleep='" + d_usleep + "'"
$ WC "d_usleepproto='" + d_usleep + "'"
+$ WC "d_nanosleep='undef'"
$ WC "d_ustat='undef'"
$ WC "d_vendorarch='undef'"
$ WC "d_vendorlib='undef'"
$ open/read/error=extra_close EXTRA extra.pods
$extra_loop:
$ read/error=extra_close/END_OF_FILE=extra_close EXTRA file
-$ file_type = f$parse(file,,,"TYPE",) - "."
+$ file_type = f$edit(f$parse(file,,,"TYPE",),"LOWERCASE") - "."
$ if file_type .nes. "VMS" .and. file_type .nes. "vms"
$ then
$ pod_file = "[.pod]perl''file_type'.pod"
$ pod_file_rdt = f$cvtime(f$file_attributes(pod_file,"RDT"))
$ if file_rdt .GTS. pod_file_rdt then do_copy := true
$ endif
-$ if do_copy then copy/log/noconfirm 'file' 'pod_file'
+$ ! wacky method to preserve case on ODS-5 even when parse style is traditional
+$ if do_copy then mcr sys$disk:[]miniperl.exe -e "exit 0+$^E unless File::Copy::rmscopy(q{''file'}, q{''pod_file'});"
$ endif
$ endif
$ goto extra_loop
$ ENDSUBROUTINE ! Bad_environment
$ echo ""
$ echo4 "Checking for dangerous pre-existing global symbols and logical names."
-$ CALL Bad_environment "TMP"
+$ CALL Bad_environment "EXT"
+$ CALL Bad_environment "FOO"
$ CALL Bad_environment "LIB"
+$ CALL Bad_environment "LIST"
+$ CALL Bad_environment "MIME"
+$ CALL Bad_environment "POSIX"
+$ CALL Bad_environment "SYS"
$ CALL Bad_environment "T"
-$ CALL Bad_environment "FOO"
-$ CALL Bad_environment "EXT"
+$ CALL Bad_environment "THREAD"
+$ CALL Bad_environment "THREADS"
+$ CALL Bad_environment "TIME"
+$ CALL Bad_environment "TMP"
+$ CALL Bad_environment "UNICODE"
+$ CALL Bad_environment "UTIL"
$ CALL Bad_environment "TEST" "SYMBOL"
$ IF f$search("config.msg") .eqs. "" THEN echo "OK."
$!
$!
$ IF ( F$SEARCH("config.msg").NES."" )
$ THEN
-$ echo "Hmm. I also noted the following information while running:"
-$ echo ""
-$ type config.msg
+$ echo4 "Hmm. I also noted the following information while running:"
+$ echo4 ""
+$ TYPE/OUTPUT=SYS$ERROR: config.msg
$ SET PROTECTION=(SYSTEM:RWED,OWNER:RWED) config.msg
$ DELETE/NOLOG/NOCONFIRM config.msg;
$ ENDIF