$ file_2_find = "[-]" + file_2_find
$ ENDIF
$!
+$ tmp = F$PARSE(file_2_find + ";",,,,"SYNTAX_ONLY")
+$ IF F$SEARCH(tmp) .NES. "" THEN file_2_find = tmp
$ dirname = F$EXTRACT(0,F$LOCATE("]",file_2_find),file_2_find) + "]"
$ file_2_find = file_2_find - dirname
$!
$ d_readlink = "undef"
$ d_symlink = "undef"
$ d_realpath = "undef"
-$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
$!
$! Hard link support has been present since 7.3-1 except for the
$! easy to use DCL test to see if hardlinks are enabled on the build
$! disk. That would require more work to test, and I am only testing
$! this on 8.2, so that is why the 8.2 test.
$!
-$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
$ THEN
$ IF f$getdvi("SYS$DISK","HARDLINKS_SUPPORTED")
$ THEN
$ echo "I will not build with hard link support."
$ ENDIF
$ ELSE
-$ echo4 "I can not dected if your CRTL and build disk support hard links."
+$ echo4 "I can not detect if your CRTL and build disk support hard links."
$ echo4 "I am disabling hard link support."
$ ENDIF
$!
$ IF uselargefiles .OR. uselargefiles .eqs. "define"
$ THEN
-$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
$ THEN
$ echo4 -
"Looking for the realpath() function to indicate symbolic link support..."
$ echo4 "I am disabling symbolic link support."
$ ENDIF
$ ELSE
-$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ IF (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
$ THEN
-$ echo4 "-duselargefiles is required for symbolic link support."
+$ echo4 "-Duselargefiles is required for symbolic link support."
$ echo4 "You did not specify that, so I am disabling symbolic link support."
$ ENDIF
$ ENDIF
$!
$! VMS V7.3-2 powered options
$! We know that it is only available for V7.3-2 and later on 64 bit platforms.
-$! Only implementing right now on 8.2 because that is what I am testing.
$!
$ d_getgrgid_r = "undef"
$ getgrgid_r_proto = "0"
$ d_setgrent = "undef"
$ d_ttyname_r = "undef"
$ ttyname_r_proto = "0"
-$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
-$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ d_snprintf = "undef"
+$ d_vsnprintf = "undef"
+$ if (vms_ver .GES. "7.3-2") .AND. (archname .NES. "VMS_VAX")
$ then
-$ echo "Found 64 bit OpenVMS 8.2, will build with V7.3-2 routines"
+$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 routines"
$ d_getgrgid_r = "define"
$ getgrgid_r_proto = "1"
$ d_getgrnam_r = "define"
$ d_setgrent = "define"
$ d_ttyname_r = "define"
$ ttyname_r_proto = "1"
+$ d_snprintf = "define"
+$ d_vsnprintf = "define"
$ endif
$!
$! VMS V7.3-2 powered options
$ d_setregid = "undef"
$ d_setreuid = "undef"
$ d_setsid = "undef"
-$! tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
-$tmp = "" ! Disable this section for now.
-$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ ! Disable this section for now.
+$!$ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
+$ if .NOT. 1
$ then
-$ echo "Found 64 bit OpenVMS 8.2, will build with V7.3-2 UID setting routines"
+$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with V7.3-2 UID setting routines"
$ d_seteuid = "define"
$ d_setpgid = "define"
$ d_setpgrp = "define"
$ d_fstatvfs = "undef"
$! d_statvfs = "undef"
$ i_sysstatvfs = "undef"
-$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
-$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
$ then
-$ echo "Found 64 bit OpenVMS 8.2, will build with 8.2 routines"
+$ echo "Found 64 bit OpenVMS ''vms_ver' -- will build with 8.2 routines"
$ d_fstatvfs = "define"
$! d_statvfs = "define"
$ i_sysstatvfs = "define"
$ d_htonl="define"
$ d_socket="define"
$ d_sockpair = "undef"
-$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
-$ if (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
+$ if (vms_ver .GES. "8.2") .AND. (archname .NES. "VMS_VAX")
$ then
$ echo "Found 64 bit OpenVMS 8.2, will build with socketpair support"
$ d_sockpair = "define"
$ WC "d_dbminitproto='undef'"
$ WC "d_difftime='define'"
$ WC "d_dirfd='undef'"
-$ tmp = f$extract(1,3,f$edit(f$getsyi("VERSION"),"TRIM,COLLAPSE"))
-$ IF (tmp .GES. "8.2") .AND. (f$getsyi("HW_MODEL") .GE. 1024)
-$ then
-$! Sorry, CRTL does not have this, and in order to support
-$! POSIX filespecifications, the CRTL readdir() structures
-$! need to be used globaly for now.
-$ echo "Building for OpenVMS 8.2 uses CRTL dirent.h, so no dirnamlen member"
-$ WC "d_dirnamlen='undef'"
-$ else
-$ WC "d_dirnamlen='define'"
-$ endif
+$ WC "d_dirnamlen='define'"
$ WC "d_dlerror='undef'"
$ WC "d_dlsymun='undef'"
$ WC "d_dosuid='undef'"
$ WC "d_fstatvfs='" + d_fstatvfs + "'"
$ WC "d_fsync='undef'"
$ WC "d_ftello='" + d_ftello + "'"
+$ WC "d_futimes='undef'"
$ WC "d_getcwd='define'"
$ WC "d_getespwnam='undef'"
$ WC "d_getfsstat='undef'"
$ WC "d_socklen_t='" + d_socklen_t + "'"
$ WC "d_sockpair='" + d_sockpair + "'"
$ WC "d_socks5_init='undef'"
+$ WC "d_sprintf_returns_strlen='define'"
$ WC "d_sqrtl='define'"
$ WC "d_sresgproto='undef'"
$ WC "d_sresgproto='undef'"
$ WC "d_void_closedir='define'"
$ WC "d_volatile='define'"
$ WC "d_vprintf='define'"
+$ WC "d_vsnprintf='" + d_vsnprintf + "'"
$ WC "d_wait4='" + d_wait4 + "'"
$ WC "d_waitpid='define'"
$ WC "d_wcstombs='" + d_wcstombs + "'"
$ WC "d_setprotoent_r='undef'"
$ WC "d_setpwent_r='undef'"
$ WC "d_setservent_r='undef'"
+$ WC "d_snprintf='" + d_snprintf + "'"
$ WC "d_srand48_r='undef'"
$ WC "d_srandom_r='undef'"
$ WC "d_strerror_r='undef'"
$ WRITE CONFIG "$ libnetcfg == """ + perl_setup_perl + " ''vms_prefix':[utils]libnetcfg.com"""
$ WRITE CONFIG "$ perlbug == """ + perl_setup_perl + " ''vms_prefix':[lib]perlbug.com"""
$ WRITE CONFIG "$!perlcc == """ + perl_setup_perl + " ''vms_prefix':[utils]perlcc.com"""
-$ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[lib.pod]perldoc.com -t"""
+$ WRITE CONFIG "$ perldoc == """ + perl_setup_perl + " ''vms_prefix':[lib.pods]perldoc.com -t"""
$ WRITE CONFIG "$ perlivp == """ + perl_setup_perl + " ''vms_prefix':[utils]perlivp.com"""
$ WRITE CONFIG "$ piconv == """ + perl_setup_perl + " ''vms_prefix':[utils]piconv.com"""
$ WRITE CONFIG "$ pl2pm == """ + perl_setup_perl + " ''vms_prefix':[utils]pl2pm.com"""