summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-18 09:40:58 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-18 09:40:58 +0000
commit3666098248b43282bda1153dae2f4c1e4af38d09 (patch)
tree9c69a323f89cdd81b231dc630b0eaf134225da7a /vms
parent9e6b2b00f0190751b970ece3db7033405cb08ca5 (diff)
parentd2719217c9b7910115cef7ea0c16d68e6b286cf7 (diff)
downloadperl-3666098248b43282bda1153dae2f4c1e4af38d09.tar.gz
[asperl] integrate mainline changes (untested)
p4raw-id: //depot/asperl@1010
Diffstat (limited to 'vms')
-rw-r--r--vms/config.vms53
-rw-r--r--vms/descrip.mms92
-rw-r--r--vms/ext/DCLsym/Makefile.PL3
-rw-r--r--vms/ext/Filespec.pm1
-rw-r--r--vms/ext/Stdio/Makefile.PL4
-rw-r--r--vms/ext/Stdio/Stdio.xs1
-rw-r--r--vms/ext/filespec.t2
-rw-r--r--vms/genconfig.pl4
-rw-r--r--vms/perlvms.pod35
-rw-r--r--vms/test.com15
-rw-r--r--vms/vms.c20
11 files changed, 197 insertions, 33 deletions
diff --git a/vms/config.vms b/vms/config.vms
index 35abbdb00f..9614ea60c3 100644
--- a/vms/config.vms
+++ b/vms/config.vms
@@ -11,7 +11,7 @@
* Version: 5.005
*/
-/* Configuration time: 7-Mar-1998 16:30
+/* Configuration time: 4-Apr-1998 21:30
* Configured by: Charles Bailey bailey@newman.upenn.edu
* Target system: VMS
*/
@@ -76,7 +76,7 @@
* when Perl is built. Please do not change it by hand; make
* any changes to FndVers.Com instead.
*/
-#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00463" /**/
+#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00464" /**/
#define ARCHLIB ARCHLIB_EXP /*config-skip*/
@@ -257,6 +257,16 @@
# define LONG_DOUBLESIZE 8 /**/
#endif
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#undef HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE 8 /**/
+#endif
+
/* HAS_MKSTEMP:
* This symbol, if defined, indicates that the mkstemp routine is
* available to create and open a unique temporary file.
@@ -822,6 +832,7 @@
#undef PWCHANGE /**/
#undef PWCLASS /**/
#undef PWEXPIRE /**/
+#define PWGECOS /**/
#define PWCOMMENT /**/
/* I_STDDEF:
@@ -1029,7 +1040,7 @@
* have select(), of course.
*/
#if defined(__DECC) && defined(__DECC_VER) && (__DECC_VER >= 50200000) && defined(DECCRTL_SOCKETS)
-#define Select_fd_set_t fd_set * /**/
+#define Select_fd_set_t fd_set * /* config-skip */
#else
#define Select_fd_set_t int * /* config-skip */
#endif
@@ -2105,6 +2116,38 @@
*/
#define HAS_ENDSERVENT /*config-skip*/
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETHOST_PROTOS /*config-skip*/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETNET_PROTOS /*config-skip*/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETPROTO_PROTOS /*config-skip*/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETSERV_PROTOS /*config-skip*/
+
#else /* VMS_DO_SOCKETS */
#undef HAS_SOCKET /*config-skip*/
@@ -2133,6 +2176,10 @@
#undef HAS_GETSERVENT /*config-skip*/
#undef HAS_SETSERVENT /*config-skip*/
#undef HAS_ENDSERVENT /*config-skip*/
+#undef HAS_GETHOST_PROTOS /*config-skip*/
+#undef HAS_GETNET_PROTOS /*config-skip*/
+#undef HAS_GETPROTO_PROTOS /*config-skip*/
+#undef HAS_GETSERV_PROTOS /*config-skip*/
#endif /* !VMS_DO_SOCKETS */
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 00a5c0b425..eb1a5a34e5 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -347,7 +347,7 @@ all : base extras x2p archcorefiles preplibrary perlpods
.endif
base : miniperl perl
@ $(NOOP)
-extras : Fcntl IO Opcode attrs B $(POSIX) $(THREAD) SDBM_File libmods utils podxform
+extras : Fcntl IO Opcode attrs Stdio DCLsym B $(POSIX) $(THREAD) SDBM_File libmods utils podxform
@ $(NOOP)
libmods : $(LIBPREREQ)
@ $(NOOP)
@@ -462,6 +462,10 @@ $(ARCHDIR)config.pm : [.lib]config.pm
@ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
@ $(MINIPERL) -e "use AutoSplit; autosplit_lib_modules(@ARGV)" [.lib]DynaLoader.pm
+[.ext.dynaloader]dynaloader.pm : [.ext.dynaloader]dynaloader.pm_pl
+ $(MINIPERL) $(MMS$SOURCE)
+ @ Rename/Log dynaloader.pm [.ext.dynaloader]
+
Opcode : [.lib]Opcode.pm [.lib]ops.pm [.lib]Safe.pm [.lib.auto.Opcode]Opcode$(E)
@ $(NOOP)
@@ -512,6 +516,50 @@ Fcntl : [.lib]Fcntl.pm [.lib.auto.Fcntl]Fcntl$(E)
[.ext.Fcntl]Descrip.MMS : [.ext.Fcntl]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
$(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Fcntl]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]"
+Stdio : [.lib.vms]Stdio.pm [.lib.auto.vms.Stdio]Stdio$(E) [.t.lib]vms_stdio.t
+ @ $(NOOP)
+
+[.lib.vms]Stdio.pm : [.vms.ext.stdio]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.vms.ext.Stdio]
+ $(MMS)
+ @ Set Default [---]
+
+[.lib.auto.vms.Stdio]Stdio$(E) : [.vms.ext.Stdio]Descrip.MMS
+ @ Set Default [.vms.ext.Stdio]
+ $(MMS)
+ @ Set Default [---]
+
+[.t.lib]vms_stdio.t : [.vms.ext.Stdio]test.pl
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.vms.ext.stdio]Descrip.MMS : [.vms.ext.Stdio]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[---.lib]" -e "chdir('[.vms.ext.Stdio]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[---.lib]" "INST_ARCHLIB=[---.lib]"
+
+DCLsym : [.lib.vms]DCLsym.pm [.lib.auto.vms.DCLsym]DCLsym$(E) [.t.lib]vms_dclsym.t
+ @ $(NOOP)
+
+[.lib.vms]DCLsym.pm : [.vms.ext.dclsym]Descrip.MMS
+ @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto]
+ @ Set Default [.vms.ext.DCLsym]
+ $(MMS)
+ @ Set Default [---]
+
+[.lib.auto.vms.DCLsym]DCLsym$(E) : [.vms.ext.DCLsym]Descrip.MMS
+ @ Set Default [.vms.ext.DCLsym]
+ $(MMS)
+ @ Set Default [---]
+
+[.t.lib]vms_dclsym.t : [.vms.ext.DCLsym]test.pl
+ Copy/Log $(MMS$SOURCE) $(MMS$TARGET)
+
+# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir>
+# ${@} necessary to distract different versions of MM[SK]/make
+[.vms.ext.DCLsym]Descrip.MMS : [.vms.ext.DCLsym]Makefile.PL $(LIBPREREQ) $(DBG)perlshr$(E)
+ $(MINIPERL) "-I[---.lib]" -e "chdir('[.vms.ext.DCLsym]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[---.lib]" "INST_ARCHLIB=[---.lib]"
+
attrs : [.lib]attrs.pm [.lib.auto.attrs]attrs$(E)
@ $(NOOP)
@@ -779,14 +827,14 @@ B : [.lib]B.pm [.lib]O.pm [.lib.B]Asmdata.pm [.lib.B]Assembler.pm [.lib.B]Bblock
[.lib]perlbug.com : [.utils]perlbug.PL $(ARCHDIR)Config.pm
$(MINIPERL) $(MMS$SOURCE)
- Rename/Log [.utils]perlbug.com $(MMS$TARGET)
+ Copy/Log [.utils]perlbug.com $(MMS$TARGET)
[.utils]pl2pm.com : [.utils]pl2pm.PL $(ARCHDIR)Config.pm
$(MINIPERL) $(MMS$SOURCE)
[.lib]splain.com : [.utils]splain.PL $(ARCHDIR)Config.pm
$(MINIPERL) $(MMS$SOURCE)
- Rename/Log [.utils]splain.com $(MMS$TARGET)
+ Copy/Log [.utils]splain.com $(MMS$TARGET)
[.x2p]find2perl.com : [.x2p]find2perl.PL $(ARCHDIR)Config.pm
$(MINIPERL) $(MMS$SOURCE)
@@ -826,22 +874,22 @@ B : [.lib]B.pm [.lib]O.pm [.lib.B]Asmdata.pm [.lib.B]Assembler.pm [.lib.B]Bblock
[.lib.pod]pod2html.com : [.pod]pod2html.PL $(ARCHDIR)Config.pm
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
$(MINIPERL) $(MMS$SOURCE)
- Rename/Log [.pod]pod2html.com $(MMS$TARGET)
+ Copy/Log [.pod]pod2html.com $(MMS$TARGET)
[.lib.pod]pod2latex.com : [.pod]pod2latex.PL $(ARCHDIR)Config.pm
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
$(MINIPERL) $(MMS$SOURCE)
- Rename/Log [.pod]pod2latex.com $(MMS$TARGET)
+ Copy/Log [.pod]pod2latex.com $(MMS$TARGET)
[.lib.pod]pod2man.com : [.pod]pod2man.PL $(ARCHDIR)Config.pm
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
$(MINIPERL) $(MMS$SOURCE)
- Rename/Log [.pod]pod2man.com $(MMS$TARGET)
+ Copy/Log [.pod]pod2man.com $(MMS$TARGET)
[.lib.pod]pod2text.com : [.pod]pod2text.PL $(ARCHDIR)Config.pm
@ If F$Search("[.lib]pod.dir").eqs."" Then Create/Directory [.lib.pod]
$(MINIPERL) $(MMS$SOURCE)
- Rename/Log [.pod]pod2text.com $(MMS$TARGET)
+ Copy/Log [.pod]pod2text.com $(MMS$TARGET)
preplibrary : $(MINIPERL_EXE) $(LIBPREREQ) $(SOCKPM)
@ Write Sys$Output "Autosplitting Perl library . . ."
@@ -1066,6 +1114,9 @@ perly$(O) : perly.c, perly.h, $(h)
test : all [.t.lib]vmsfspec.t [.t.lib]vmsish.t
- @[.VMS]Test.Com "$(E)"
+install :
+ $(MINIPERL) installperl
+
archify : all
@ Write Sys$Output "Moving files to architecture-specific locations for $(ARCH)"
archroot = "$(ARCHAUTO)" - "]" + "...]"
@@ -1313,6 +1364,7 @@ tidy : cleanlis
- If F$Search("Perlshr_Gbl*.Mar;-1") .nes."" Then Purge/NoConfirm/Log Perlshr_Gbl*.Mar
- If F$Search("[.Ext.DynaLoader]DL_VMS$(O);-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS$(O)
- If F$Search("[.Ext.DynaLoader]DL_VMS.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C
+ - If F$Search("[.Ext.Socket]Socket.C;-1").nes."" Then Purge/NoConfirm/Log [.Ext.DynaLoader]DL_VMS.C
- If F$Search("[.Ext.Opcode...];-1").nes."" Then Purge/NoConfirm/Log [.Ext.Opcode]
- If F$Search("[.VMS.Ext...]*.C;-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*.C
- If F$Search("[.VMS.Ext...]*$(O);-1").nes."" Then Purge/NoConfirm/Log [.VMS.Ext...]*$(O)
@@ -1328,6 +1380,7 @@ tidy : cleanlis
- If F$Search("[.Lib.Pod]*.Pod;-1").nes."" Then Purge/NoConfirm/Log [.Lib.Pod]*.Pod
- If F$Search("$(ARCHCORE)*.*").nes."" Then Purge/NoConfirm/Log $(ARCHCORE)*.*
- If F$Search("[.lib]*.com;-1").nes."" Then Purge/NoConfirm/Log [.lib]*.com
+ - If F$Search("[.pod]*.com;-1").nes."" Then Purge/NoConfirm/Log [.pod]*.com
- If F$Search("[.utils]*.com;-1").nes."" Then Purge/NoConfirm/Log [.utils]*.com
- If F$Search("[.x2p]*.com;-1").nes."" Then Purge/NoConfirm/Log [.x2p]*.com
- If F$Search("[.lib.pod]*.com;-1").nes."" Then Purge/NoConfirm/Log [.lib.pod]*.com
@@ -1358,9 +1411,15 @@ clean : tidy
- $(MMS) clean
Set Default [--]
.endif
- Set Default [.ext.SDBM_File]
- - $(MMS) clean
- Set Default [--]
+ Set Default [.ext.SDBM_File]
+ - $(MMS) clean
+ Set Default [--]
+ Set Default [.vms.ext.Stdio]
+ - $(MMS) clean
+ Set Default [---]
+ Set Default [.vms.ext.DCLsym]
+ - $(MMS) clean
+ Set Default [---]
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*/Exclude=PerlShr_*.Opt
- If F$Search("[...]*$(O);*") .nes."" Then Delete/NoConfirm/Log [...]*$(O);*
- If F$Search("Config.H").nes."" Then Delete/NoConfirm/Log Config.H;*
@@ -1381,6 +1440,7 @@ clean : tidy
- If F$Search("[.Ext.Socket]Socket.C").nes."" Then Delete/NoConfirm/Log [.Ext.Socket]Socket.C;*
- If F$Search("[.VMS.Ext...]*.C").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*.C;*
- If F$Search("[.VMS.Ext...]*$(O)").nes."" Then Delete/NoConfirm/Log [.VMS.Ext...]*$(O);*
+ - If F$Search("[.pod]*.com").nes."" Then Delete/NoConfirm/Log [.pod]*.com;*
realclean : clean
Set Default [.ext.Fcntl]
@@ -1408,9 +1468,15 @@ realclean : clean
- $(MMS) realclean
Set Default [--]
.endif
- Set Default [.ext.SDBM_File]
- - $(MMS) realclean
- Set Default [--]
+ Set Default [.ext.SDBM_File]
+ - $(MMS) realclean
+ Set Default [--]
+ Set Default [.vms.ext.Stdio]
+ - $(MMS) clean
+ Set Default [---]
+ Set Default [.vms.ext.DCLsym]
+ - $(MMS) clean
+ Set Default [---]
- If F$Search("*$(OLB)").nes."" Then Delete/NoConfirm/Log *$(OLB);*
- If F$Search("*.Opt").nes."" Then Delete/NoConfirm/Log *.Opt;*
- $(MINIPERL) -e "use File::Path; rmtree(['lib/auto','lib/VMS','lib/$(ARCH)'],1,0);"
diff --git a/vms/ext/DCLsym/Makefile.PL b/vms/ext/DCLsym/Makefile.PL
index 8e6f5bce40..84ab2be2b5 100644
--- a/vms/ext/DCLsym/Makefile.PL
+++ b/vms/ext/DCLsym/Makefile.PL
@@ -1,3 +1,4 @@
use ExtUtils::MakeMaker;
-WriteMakefile( 'VERSION_FROM' => 'DCLsym.pm' );
+WriteMakefile( 'VERSION_FROM' => 'DCLsym.pm',
+ 'MAN3PODS' => ' ');
diff --git a/vms/ext/Filespec.pm b/vms/ext/Filespec.pm
index b0b1414599..4a539c2701 100644
--- a/vms/ext/Filespec.pm
+++ b/vms/ext/Filespec.pm
@@ -266,6 +266,7 @@ sub fileify ($) {
my($path) = @_;
if (!$path) { return undef }
+ if ($path eq '/') { return 'sys$disk:[000000]'; }
if ($path =~ /(.+)\.([^:>\]]*)$/) {
$path = $1;
if ($2 !~ /^dir(?:;1)?$/i) { return undef }
diff --git a/vms/ext/Stdio/Makefile.PL b/vms/ext/Stdio/Makefile.PL
index e5ea988818..f5599f8a96 100644
--- a/vms/ext/Stdio/Makefile.PL
+++ b/vms/ext/Stdio/Makefile.PL
@@ -1,3 +1,5 @@
use ExtUtils::MakeMaker;
-WriteMakefile( 'VERSION_FROM' => 'Stdio.pm' );
+WriteMakefile( 'VERSION_FROM' => 'Stdio.pm',
+ 'MAN3PODS' => ' ', # pods will be built later
+ );
diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs
index 0a7b47e514..9744be04f2 100644
--- a/vms/ext/Stdio/Stdio.xs
+++ b/vms/ext/Stdio/Stdio.xs
@@ -87,6 +87,7 @@ newFH(FILE *fp, char type) {
HV *stash;
IO *io;
+ dTHR;
/* Find stash for VMS::Stdio. We don't do this once at boot
* to allow for possibility of threaded Perl with per-thread
* symbol tables. This code (through io = ...) is really
diff --git a/vms/ext/filespec.t b/vms/ext/filespec.t
index 05644917b6..779396be73 100644
--- a/vms/ext/filespec.t
+++ b/vms/ext/filespec.t
@@ -96,6 +96,7 @@ some/where/... vmsify [.some.where...]
.. vmsify [-]
../.. vmsify [--]
.../ vmsify [...]
+/ vmsify sys$disk:[000000]
# Fileifying directory specs
down:[the.garden.path] fileify down:[the.garden]path.dir;1
@@ -135,6 +136,7 @@ down:[the.garden.path...] unixpath /down/the/garden/path/.../
[.down.the.garden]path.dir unixpath down/the/garden/path/
down/the/garden/path vmspath [.down.the.garden.path]
path vmspath [.path]
+/ vmspath sys$disk:[000000]
# Redundant characters in Unix paths
//some/where//over/../the.rainbow vmsify some:[where]the.rainbow
diff --git a/vms/genconfig.pl b/vms/genconfig.pl
index 4e0cf31655..45f50cad5f 100644
--- a/vms/genconfig.pl
+++ b/vms/genconfig.pl
@@ -190,6 +190,10 @@ foreach (@ARGV) {
print OUT "netdb_name_type=",$dosock ? "'char *'\n" : "'undef'\n";
print OUT "netdb_host_type=",$dosock ? "'char *'\n" : "'undef'\n";
print OUT "netdb_hlen_type=",$dosock ? "'int'\n" : "'undef'\n";
+ print OUT "d_gethostprotos=",$dosock ? "'define'\n" : "'undef'\n";
+ print OUT "d_getnetprotos=",$dosock ? "'define'\n" : "'undef'\n";
+ print OUT "d_getservprotos=",$dosock ? "'define'\n" : "'undef'\n";
+ print OUT "d_getprotoprotos=",$dosock ? "'define'\n" : "'undef'\n";
if ($dosock and $cctype eq 'decc' and $ccflags =~ /DECCRTL_SOCKETS/) {
print OUT "selecttype='fd_set'\n";
diff --git a/vms/perlvms.pod b/vms/perlvms.pod
index 4aa68008d5..89c4bbf623 100644
--- a/vms/perlvms.pod
+++ b/vms/perlvms.pod
@@ -663,12 +663,20 @@ list logical names. For instance, if you say
Perl will print C<ONCE UPON A TIME THERE WAS>.
-The %ENV keys C<home>, C<path>,C<term>, and C<user>
-return the CRTL "environment variables" of the same
-names, if these logical names are not defined. The
-key C<default> returns the current default device
+The key C<default> returns the current default device
and directory specification, regardless of whether
-there is a logical name DEFAULT defined..
+there is a logical name DEFAULT defined. If you try to
+read an element of %ENV for which there is no corresponding
+logical name, and for which no corresponding CLI symbol
+exists (this is to identify "blocking" symbols only; to
+manipulate CLI symbols, see L<VMS::DCLSym>) then the key
+will be looked up in the CRTL-local environment array, and
+the corresponding value, if any returned. This lets you
+get at C-specific keys like C<home>, C<path>,C<term>, and
+C<user>, as well as other keys which may have been passed
+directly into the C-specific array if Perl was called from
+another C program using the version of execve() or execle()
+present in recent revisions of the DECCRTL.
Setting an element of %ENV defines a supervisor-mode logical
name in the process logical name table. C<Undef>ing or
@@ -680,6 +688,23 @@ logical name translation after the deletion, so an inner-mode
logical name or a name in another logical name table will
replace the logical name just deleted. It is not possible
at present to define a search list logical name via %ENV.
+It is also not possible to delete an element from the
+C-local environ array.
+
+Note that if you want to pass on any elements of the
+C-local environ array to a subprocess which isn't
+started by fork/exec, or isn't running a C program, you
+can "promote" them to logical names in the current
+process, which will then be inherited by all subprocesses,
+by saying
+
+ foreach my $key (qw[C-local keys you want promoted]) {
+ my $temp = $ENV{$key}; # read from C-local array
+ $ENV{$key} = $temp; # and define as logical name
+ }
+
+(You can't just say C<$ENV{$key} = $ENV{$key}>, since the
+Perl optimizer is smart enough to elide the expression.)
At present, the first time you iterate over %ENV using
C<keys>, or C<values>, you will incur a time penalty as all
diff --git a/vms/test.com b/vms/test.com
index affc6a83c7..f131088dda 100644
--- a/vms/test.com
+++ b/vms/test.com
@@ -21,8 +21,17 @@ $ EndIf
$ EndIf
$ Set Message /Facility/Severity/Identification/Text
$
-$ exe = ".Exe"
-$ If p1.nes."" Then exe = p1
+$ exe = ".Exe"
+$ If p1.nes."" Then exe = p1
+$ If F$Extract(0,1,exe) .nes. "."
+$ Then
+$ Write Sys$Error ""
+$ Write Sys$Error "The first parameter passed to Test.Com must be the file type used for the"
+$ Write Sys$Error "images produced when you built Perl (i.e. "".Exe"", unless you edited"
+$ Write Sys$Error "Descrip.MMS or used the AXE=1 macro in the MM[SK] command line."
+$ Write Sys$Error ""
+$ Exit 44
+$ EndIf
$! Pick up a copy of perl to use for the tests
$ Delete/Log/NoConfirm Perl.;*
$ Copy/Log/NoConfirm [-]Perl'exe' []Perl.
@@ -103,7 +112,7 @@ use Config;
# insists on stat()ing a file descriptor before it'll use it.
push(@libexcl,'io_xs.t') if $Config{'vms_cc_type'} ne 'decc';
-@opexcl=('exec.t','fork.t','glob.t','groups.t','magic.t','misc.t','stat.t');
+@opexcl=('die_exit.t','exec.t','fork.t','glob.t','groups.t','magic.t','misc.t','stat.t');
@exclist=(@compexcl,@ioexcl,@libexcl,@opexcl);
foreach $file (@exclist) { $skip{$file}++; }
diff --git a/vms/vms.c b/vms/vms.c
index 0d6f453246..62f27c37a5 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -196,7 +196,7 @@ prime_env_iter(void)
# define CLI$M_TRUSTED 0x40 /* Missing from VAXC headers */
#endif
unsigned long int flags = CLI$M_NOWAIT | CLI$M_NOCLISYM | CLI$M_NOKEYPAD | CLI$M_TRUSTED;
- unsigned long int retsts, substs = 0, wakect = 0;
+ unsigned long int i, retsts, substs = 0, wakect = 0;
STRLEN eqvlen;
SV *oldrs, *linesv, *eqvsv;
$DESCRIPTOR(cmddsc,"Show Logical *"); $DESCRIPTOR(nldsc,"_NLA0:");
@@ -212,12 +212,18 @@ prime_env_iter(void)
/* Perform a dummy fetch as an lval to insure that the hash table is
* set up. Otherwise, the hv_store() will turn into a nullop. */
(void) hv_fetch(envhv,"DEFAULT",7,TRUE);
- /* Also, set up the four "special" keys that the CRTL defines,
- * whether or not underlying logical names exist. */
- (void) hv_fetch(envhv,"HOME",4,TRUE);
- (void) hv_fetch(envhv,"TERM",4,TRUE);
- (void) hv_fetch(envhv,"PATH",4,TRUE);
- (void) hv_fetch(envhv,"USER",4,TRUE);
+ /* Also, set up any "special" keys that the CRTL defines,
+ * either by itself or becasue we were called from a C program
+ * using exec[lv]e() */
+ for (i = 0; environ[i]; i++) {
+ if (!(start = strchr(environ[i],'='))) {
+ warn("Ill-formed CRTL environ value \"%s\"\n",environ[i]);
+ }
+ else {
+ start++;
+ (void) hv_store(envhv,environ[i],start - environ[i] - 1,newSVpv(start,0),0);
+ }
+ }
/* Now, go get the logical names */
create_mbx(&chan,&mbxdsc);