summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Mulder <hansmu@xs4all.nl>1998-12-03 03:05:55 +0200
committerJarkko Hietaniemi <jhi@iki.fi>1998-12-03 08:15:13 +0000
commit3937c24e3f4ed26beafd7a2fbe3a20466bfc2b2d (patch)
tree5e3c84310da31b73daff5f69ebcd0114f6e2327d
parentb687b08b628449b317ff558f31d9d716ace045de (diff)
downloadperl-3937c24e3f4ed26beafd7a2fbe3a20466bfc2b2d.tar.gz
Initial VMS patches
To: perl5-porters@perl.org, vmsperl@cor.newman.upenn.edu Message-ID: <MLIST_3.0.6.32.19981202141057.0339a7f0@ous.edu> The patch to config_h.SH requires more study because metaconfig needs to agree. p4raw-id: //depot/cfgperl@2441
-rw-r--r--config_h.SH6
-rw-r--r--configure.com19
-rw-r--r--global.sym1
-rw-r--r--lib/ExtUtils/MM_VMS.pm1
-rwxr-xr-xt/lib/textfill.t6
-rwxr-xr-xt/pragma/warning.t2
-rw-r--r--vms/descrip_mms.template16
-rw-r--r--vms/gen_shrfls.pl11
-rw-r--r--vms/subconfigure.com576
-rw-r--r--vms/vmsish.h2
10 files changed, 626 insertions, 14 deletions
diff --git a/config_h.SH b/config_h.SH
index 1a01c9f4c8..865d43e970 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -261,7 +261,10 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_gethname HAS_GETHOSTNAME /**/
#$d_uname HAS_UNAME /**/
+#$d_phostname HAS_PHOSTNAME
+#ifdef PHOSTNAME
#$d_phostname PHOSTNAME "$aphostname" /* How to get the host name */
+#endif
/* HAS_GETLOGIN:
* This symbol, if defined, indicates that the getlogin routine is
@@ -2399,7 +2402,10 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
* If defined, possible values are PTHREAD_CREATE_UNDETACHED
* and __UNDETACHED.
*/
+#$d_pthread_create_joinable HAS_PTHREAD_CREATE_JOINABLE
+#ifdef HAS_PTHREAD_CREATE_JOINABLE
#$d_pthread_create_joinable PTHREAD_CREATE_JOINABLE $pthread_create_joinable /**/
+#endif
/* HAS_PTHREAD_YIELD:
* This symbol, if defined, indicates that the pthread_yield
diff --git a/configure.com b/configure.com
index d51793abe8..24ce886c62 100644
--- a/configure.com
+++ b/configure.com
@@ -46,6 +46,7 @@ $ use_two_pot_malloc = "N"
$ use_pack_malloc = "N"
$ use_debugmalloc = "N"
$ preload_env = "N"
+$ use_multiplicity = "N"
$ vms_default_directory_name = F$ENVIRONMENT("DEFAULT")
$! max_allowed_dir_depth = 3 ! e.g. [A.B.PERL5_00n] not [A.B.C.PERL5_00n]
$ max_allowed_dir_depth = 2 ! e.g. [FOO.PERL5_00n] not [FOO.BAR.PERL5_00n]
@@ -1669,6 +1670,24 @@ $ IF ans.eqs."socketshr" then has_socketshr = "T"
$ endif
$!
$!
+$! Ask if they want to build with MULTIPLICITY
+$ echo "The perl interpreter engine can be built in a way that makes it
+$ echo "possible for a program that embeds perl into it (and yep, you can
+$ echo "do that--it's pretty keen) to have multiple perl interpreters active
+$ echo "at once. There is some performance overhead, however, so you
+$ echo "probably don't want to choose this unless you're going to be doing
+$ echo "funky perl embedding."
+$ echo ""
+$ dflt = "n"
+$ rp = "Build with MULTIPLICITY? [''dflt'] "
+$ GOSUB myread
+$ if ans.eqs."" then ans = dflt
+$ if (f$extract(0, 1, "''ans'").eqs."Y").or.(f$extract(0, 1, "''ans'").eqs."y")
+$ THEN
+$ use_multiplicity="Y"
+$ ELSE
+$ use_multiplicity="N"
+$ ENDIF
$! Ask about threads, if appropriate
$ if (Using_Dec_C.eqs."Yes")
$ THEN
diff --git a/global.sym b/global.sym
index 7c1ecc55d8..995a279bee 100644
--- a/global.sym
+++ b/global.sym
@@ -499,6 +499,7 @@ scan_trans
scan_word
scope
screaminstr
+seed
setdefout
setenv_getix
share_hek
diff --git a/lib/ExtUtils/MM_VMS.pm b/lib/ExtUtils/MM_VMS.pm
index 8f66a43d97..8f8ac1787c 100644
--- a/lib/ExtUtils/MM_VMS.pm
+++ b/lib/ExtUtils/MM_VMS.pm
@@ -1466,6 +1466,7 @@ $(INST_STATIC) : $(OBJECT) $(MYEXTLIB)
}
foreach $lib (split $self->{EXTRALIBS}) {
+ $lib = '""' if $lib eq '"';
push(@m,"\t",'$(NOECHO) $(PERL) -e "print qq{',$lib,'\n}" >>$(INST_ARCHAUTODIR)extralibs.ld',"\n");
}
push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
diff --git a/t/lib/textfill.t b/t/lib/textfill.t
index 857ae2f755..4916e270a1 100755
--- a/t/lib/textfill.t
+++ b/t/lib/textfill.t
@@ -54,11 +54,7 @@ DONE
$| = 1;
-print "1..";
-print @tests/2;
-print "\n";
-
-use Text::Wrap;
+print "1..", @tests/2, "\n";
$rerun = $ENV{'PERL_DL_NONLAZY'} ? 0 : 1;
diff --git a/t/pragma/warning.t b/t/pragma/warning.t
index 653e2be3a5..640dc2f958 100755
--- a/t/pragma/warning.t
+++ b/t/pragma/warning.t
@@ -52,7 +52,7 @@ for (@prgs){
my @temps = () ;
if (s/^\s*-\w+//){
$switch = $&;
- $switch =~ s/(-\S*[A-Z]\S*)/"-$1"/ if $Is_VMS; # protect uc switches
+ $switch =~ s/(-\S*[A-Z]\S*)/"$1"/ if $Is_VMS; # protect uc switches
}
my($prog,$expected) = split(/\nEXPECT\n/, $_);
if ( $prog =~ /--FILE--/) {
diff --git a/vms/descrip_mms.template b/vms/descrip_mms.template
index 087c0153eb..a8cbab3070 100644
--- a/vms/descrip_mms.template
+++ b/vms/descrip_mms.template
@@ -282,21 +282,21 @@ h4 = regexp.h, scope.h, sv.h, vmsish.h, util.h, perlsdio.h, perlio.h
h5 = embedvar.h, intrpvar.h, perlvars.h, thrdvar.h, iperlsys.h
h = $(h1), $(h2), $(h3), $(h4), $(h5) $(SOCKHLIS) $(THREADH)
-c1 = av.c, scope.c, op.c, doop.c, doio.c, dump.c, hv.c, mg.c, universal.c, perlio.c
+c1 = av.c, scope.c, op.c, doop.c, doio.c, dump.c, hv.c, mg.c, universal.c, perlio.c, utf8.c
c2 = perl.c, perly.c, pp.c, pp_hot.c, pp_ctl.c, pp_sys.c, regcomp.c, regexec.c $(MALLOC_C)
c3 = gv.c, sv.c, taint.c, toke.c, util.c, deb.c, run.c, globals.c, vms.c, byterun.c $(SOCKCLIS)
c = $(c1), $(c2), $(c3), miniperlmain.c, perlmain.c, byteperl.c
obj1 = perl$(O), gv$(O), toke$(O), perly$(O), op$(O), regcomp$(O), dump$(O), util$(O), mg$(O), perlio$(O) $(MALLOC_O)
-obj2 = hv$(O), av$(O), run$(O), pp_hot$(O), sv$(O), pp$(O), scope$(O), pp_ctl$(O), pp_sys$(O)
+obj2 = hv$(O), av$(O), run$(O), pp_hot$(O), sv$(O), pp$(O), scope$(O), pp_ctl$(O), pp_sys$(O), utf8$(O)
obj3 = doop$(O), doio$(O), regexec$(O), taint$(O), deb$(O), universal$(O), globals$(O), vms$(O), byterun$(O) $(SOCKOBJ)
obj = $(obj1), $(obj2), $(obj3)
ac1 = $(ARCHCORE)EXTERN.h $(ARCHCORE)INTERN.h $(ARCHCORE)XSUB.h $(ARCHCORE)av.h
ac2 = $(ARCHCORE)config.h $(ARCHCORE)cop.h $(ARCHCORE)cv.h $(ARCHCORE)embed.h
-ac3 = $(ARCHCORE)form.h $(ARCHCORE)gv.h $(ARCHCORE)handy.h $(ARCHCORE)hv.h
+ac3 = $(ARCHCORE)form.h $(ARCHCORE)gv.h $(ARCHCORE)handy.h $(ARCHCORE)hv.h $(ARCHCORE)utf8.h
ac4 = $(ARCHCORE)keywords.h $(ARCHCORE)mg.h $(ARCHCORE)op.h $(ARCHCORE)opcode.h
ac5 = $(ARCHCORE)patchlevel.h $(ARCHCORE)perl.h $(ARCHCORE)perly.h $(ARCHCORE)thread.h $(ARCHCORE)iperlsys.h
ac6 = $(ARCHCORE)pp.h $(ARCHCORE)proto.h $(ARCHCORE)regcomp.h $(ARCHCORE)perlsdio.h $(ARCHCORE)perlio.h
@@ -1075,6 +1075,10 @@ preplibrary : $(MINIPERL_EXE) $(LIBPREREQ) $(SOCKPM)
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
@ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+[.lib.pod]perlreftut.pod : [.pod]perlreftut.pod
+ @ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
+ @ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
[.lib.pod]perltrap.pod : [.pod]perltrap.pod
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
@ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
@@ -1301,6 +1305,9 @@ $(ARCHCORE)thread.h : thread.h
$(ARCHCORE)util.h : util.h
@ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+$(ARCHCORE)utf8.h : utf8.h
+ @ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
$(ARCHCORE)vmsish.h : vmsish.h
@ If F$Search("$(ARCHDIR)CORE.dir").eqs."" Then Create/Directory $(ARCHCORE)
Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
@@ -1416,6 +1423,9 @@ taint$(O) : taint.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsd
toke$(O) : toke.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h keywords.h iperlsys.h
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
+utf8$(O) : utf8.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h keywords.h iperlsys.h utf8.h
+ $(CC) $(CORECFLAGS) $(MMS$SOURCE)
+
universal$(O) : universal.c EXTERN.h perl.h bytecode.h byterun.h config.h embed.h perlsdio.h handy.h vmsish.h regexp.h sv.h util.h form.h gv.h cv.h opcode.h op.h cop.h av.h hv.h mg.h scope.h perly.h thread.h pp.h proto.h embedvar.h perlvars.h thrdvar.h intrpvar.h XSUB.h iperlsys.h
$(CC) $(CORECFLAGS) $(MMS$SOURCE)
diff --git a/vms/gen_shrfls.pl b/vms/gen_shrfls.pl
index 750abb0a66..f6906c51c9 100644
--- a/vms/gen_shrfls.pl
+++ b/vms/gen_shrfls.pl
@@ -262,18 +262,23 @@ LINE: while (<CPP>) {
}
close CPP;
-
+# This was:
# Kluge to determine whether we need to add EMBED prefix to
# symbols read from local list. vmsreaddirversions() is a VMS-
# specific function whose Perl_ prefix is added in vmsish.h
# if EMBED is #defined.
-$embed = exists($fcns{'Perl_vmsreaddirversions'}) ? 'Perl_' : '';
+#
+# but now we always define EMBED, so it's not a big deal any more
while (<DATA>) {
next if /^#/;
s/\s+#.*\n//;
next if /^\s*$/;
($key,$array) = split('=',$_);
- $key = "$embed$key";
+ if ($array eq 'vars') {
+ $key = "PL_$key";
+ } else {
+ $key = "Perl_$key";
+ }
print "Adding $key to \%$array list\n" if $debug > 1;
${$array}{$key}++;
}
diff --git a/vms/subconfigure.com b/vms/subconfigure.com
index 533aa931fc..5c5dc29562 100644
--- a/vms/subconfigure.com
+++ b/vms/subconfigure.com
@@ -49,6 +49,12 @@ $ 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")
@@ -60,12 +66,60 @@ $ perl_package="''package'"
$ perl_baserev = "''baserev'"
$ cc_defines=""
$ 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 = "random()"
+$ perl_randseedtype = "unsigned int"
+$ perl_seedfunc = "srand"
+$ 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"
+$ perl_use64bits = "undef"
+$ perl_d_drand48proto = "define"
$ perl_libpth="/sys$share /sys$library"
$ perl_ld="Link"
$ perl_lddlflags="/Share"
@@ -82,6 +136,9 @@ $ 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"
@@ -371,6 +428,9 @@ $ 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
@@ -862,6 +922,227 @@ $ 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_off64t = "undef"
+$ ELSE
+$ perl_d_off64t="define"
+$ ENDIF
+$ WRITE_RESULT "d_off64t is ''perl_d_off64t'"
+$!
+$! 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
@@ -908,6 +1189,190 @@ $ 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
@@ -1001,6 +1466,52 @@ $ ENDIF
$ ENDIF
$ WRITE_RESULT "d_fcntl is ''perl_d_fcntl'"
$!
+$! Check for access
+$!
+$ OS
+$ WS "#ifdef __DECC
+$ WS "#include <stdlib.h>
+$ WS "#endif
+$ WS "#include <stdio.h>
+$ WS "#include <unistd.h>
+$ 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
@@ -2472,6 +2983,71 @@ $ 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_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_drand48proto='" + perl_d_drand48proto + "'"
+$ WC "d_pthread_create_joinable='" + perl_d_pthread_create_joinable + "'"
+$ WC "pthread_create_joinable='" + perl_pthread_create_joinable + "'"
+$ WC "drand01='" + perl_drand01 + "'"
+$ WC "randseedtype='" + perl_randseedtype + "'"
+$ WC "seedfunc='" + perl_seedfunc + "'"
+$ WC "sig_num_init='" + perl_sig_num_with_commas + "'"
$!
$! ##WRITE NEW CONSTANTS HERE##
$!
diff --git a/vms/vmsish.h b/vms/vmsish.h
index e74c7fbc2d..5e78b90a89 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -83,7 +83,6 @@
#define DONT_DECLARE_STD 1
/* Our own contribution to PerlShr's global symbols . . . */
-#ifdef EMBED
# define my_trnlnm Perl_my_trnlnm
# define my_getenv Perl_my_getenv
# define prime_env_iter Perl_prime_env_iter
@@ -144,7 +143,6 @@
# define my_getlogin Perl_my_getlogin
# define rmscopy Perl_rmscopy
# define init_os_extras Perl_init_os_extras
-#endif
/* Delete if at all possible, changing protections if necessary. */
#define unlink kill_file