diff options
author | Perl 5 Porters <perl5-porters@africa.nicoh.com> | 1996-11-19 14:16:00 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1996-11-19 14:16:00 +1200 |
commit | 55497cffdd24c959994f9a8ddd56db8ce85e1c5b (patch) | |
tree | 444dfb8adc0e5b96d56e0532791122c366f50a3e /vms | |
parent | c822f08a5087943f7d9e2c36ce42ea035f03ab97 (diff) | |
download | perl-55497cffdd24c959994f9a8ddd56db8ce85e1c5b.tar.gz |
[inseparable changes from patch from perl5.003_07 to perl5.003_08]
CORE LANGUAGE CHANGES
Subject: Bitwise op sign rationalization
From: Chip Salzenberg <chip@atlantic.net>
Files: op.c opcode.pl pod/perlop.pod pod/perltoc.pod pp.c pp.h pp_hot.c proto.h sv.c t/op/bop.t
Make bitwise ops result in unsigned values, unless C<use
integer> is in effect. Includes initial support for UVs.
Subject: Defined scoping for C<my> in control structures
From: Chip Salzenberg <chip@atlantic.net>
Files: op.c perly.c perly.c.diff perly.h perly.y proto.h toke.c
Finally defines semantics of "my" in control expressions,
like the condition of "if" and "while". In all cases, scope
of a "my" var extends to the end of the entire control
structure. Also adds new construct "for my", which
automatically declares the control variable "my" and limits
its scope to the loop.
Subject: Fix ++/-- after int conversion (e.g. 'printf "%d"')
From: Chip Salzenberg <chip@atlantic.net>
Files: pp.c pp_hot.c sv.c
This patch makes Perl correctly ignore SvIVX() if either
NOK or POK is true, since SvIVX() may be a truncated or
overflowed version of the real value.
Subject: Make code match Camel II re: functions that use $_
From: Paul Marquess <pmarquess@bfsec.bt.co.uk>
Files: opcode.pl
Subject: Provide scalar context on left side of "->"
From: Chip Salzenberg <chip@atlantic.net>
Files: perly.c perly.y
Subject: Quote bearword package/handle FOO in "funcname FOO => 'bar'"
From: Chip Salzenberg <chip@atlantic.net>
Files: toke.c
OTHER CORE CHANGES
Subject: Warn on overflow of octal and hex integers
From: Chip Salzenberg <chip@atlantic.net>
Files: proto.h toke.c util.c
Subject: If -w active, warn for commas and hashes ('#') in qw()
From: Chip Salzenberg <chip@atlantic.net>
Files: toke.c
Subject: Fixes for pack('w')
From: Ulrich Pfeifer <pfeifer@charly.informatik.uni-dortmund.de>
Files: pp.c t/op/pack.t
Subject: More complete output from sv_dump()
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: sv.c
Subject: Major '..' and debugger patches
From: Ilya Zakharevich <ilya@math.ohio-state.edu>
Files: lib/perl5db.pl op.c pp_ctl.c scope.c scope.h
Subject: Fix for formline()
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: global.sym mg.c perl.h pod/perldiag.pod pp_ctl.c proto.h sv.c t/op/write.t
Subject: Fix stack botch in untie and binmode
From: Gurusamy Sarathy <gsar@engin.umich.edu>
Files: pp_sys.c
Subject: Complete EMBED, including symbols from interp.sym
From: Chip Salzenberg <chip@atlantic.net>
Files: MANIFEST embed.pl ext/DynaLoader/dlutils.c ext/SDBM_File/sdbm/sdbm.h global.sym handy.h malloc.c perl.h pp_sys.c proto.h regexec.c toke.c util.c x2p/Makefile.SH x2p/a2p.h x2p/handy.h x2p/util.h
New define EMBEDMYMALLOC makes embedding total by
avoiding "Mymalloc" etc.
Subject: Support old embedding for people who want it
From: Chip Salzenberg <chip@atlantic.net>
Files: MANIFEST Makefile.SH old_embed.pl old_global.sym
PORTABILITY
Subject: Miscellaneous VMS fixes
From: Charles Bailey <bailey@HMIVAX.HUMGEN.UPENN.EDU>
Files: lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_VMS.pm lib/Math/Complex.pm lib/Time/Local.pm lib/timelocal.pl perl.h perl_exp.SH proto.h t/TEST t/io/read.t t/lib/findbin.t t/lib/getopt.t util.c utils/h2xs.PL vms/Makefile vms/config.vms vms/descrip.mms vms/ext/Stdio/Stdio.pm vms/ext/Stdio/Stdio.xs vms/perlvms.pod vms/test.com vms/vms.c
Subject: DJGPP patches (MS-DOS)
From: "Douglas E. Wegscheid" <wegscd@whirlpool.com>
Files: doio.c dosish.h ext/SDBM_File/sdbm/sdbm.c handy.h lib/AutoSplit.pm lib/Cwd.pm lib/File/Find.pm malloc.c perl.c perl.h pp_sys.c proto.h sv.c util.c
Subject: Patch to make Perl work under AmigaOS
From: "Norbert Pueschel" <pueschel@imsdd.meb.uni-bonn.de>
Files: MANIFEST hints/amigaos.sh installman lib/File/Basename.pm lib/File/Find.pm pod/pod2man.PL pp_sys.c util.c
Diffstat (limited to 'vms')
-rw-r--r-- | vms/Makefile | 2 | ||||
-rw-r--r-- | vms/config.vms | 4 | ||||
-rw-r--r-- | vms/descrip.mms | 36 | ||||
-rw-r--r-- | vms/ext/Stdio/Stdio.pm | 6 | ||||
-rw-r--r-- | vms/ext/Stdio/Stdio.xs | 6 | ||||
-rw-r--r-- | vms/genconfig.pl | 4 | ||||
-rw-r--r-- | vms/perlvms.pod | 17 | ||||
-rw-r--r-- | vms/test.com | 2 | ||||
-rw-r--r-- | vms/vms.c | 10 |
9 files changed, 70 insertions, 17 deletions
diff --git a/vms/Makefile b/vms/Makefile index 98c0747735..7b9d2b5535 100644 --- a/vms/Makefile +++ b/vms/Makefile @@ -32,7 +32,7 @@ ARCH = VMS_VAX OBJVAL = $@ # Updated by fndvers.com -- do not edit by hand -PERL_VERSION = 5_00304# +PERL_VERSION = 5_00307# ARCHDIR = [.lib.$(ARCH).$(PERL_VERSION)] diff --git a/vms/config.vms b/vms/config.vms index b9e51c7c25..792c893b00 100644 --- a/vms/config.vms +++ b/vms/config.vms @@ -8,7 +8,7 @@ * GenConfig.pl when producing Config.pm. * * config.h for VMS - * Version: 5.002_01 + * Version: 5.003_07 */ /* Configuration time: 22-Mar-1996 14:45 @@ -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_00305" /**/ +#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00307" /**/ #define ARCHLIB ARCHLIB_EXP /*config-skip*/ /* CPPSTDIN: diff --git a/vms/descrip.mms b/vms/descrip.mms index b628c2c265..a162ad03bc 100644 --- a/vms/descrip.mms +++ b/vms/descrip.mms @@ -65,7 +65,7 @@ OBJVAL = $(MMS$TARGET_NAME)$(O) .endif # Updated by fndvers.com -- do not edit by hand -PERL_VERSION = 5_00305# +PERL_VERSION = 5_00307# ARCHDIR = [.lib.$(ARCH).$(PERL_VERSION)] @@ -94,6 +94,7 @@ XTRADEF = ,GNUC_ATTRIBUTE_CHECK XTRAOBJS = LIBS1 = GNU_CC:[000000]GCCLIB.OLB/Library LIBS2 = Sys$Share:VAXCRTL/Shareable +POSIX = .else XTRAOBJS = LIBS1 = $(XTRAOBJS) @@ -117,6 +118,7 @@ DBGSPECFLAGS = /Show=(Source,Include,Expansion) LIBS2 = XTRACCFLAGS = /Include=[]/Standard=Relaxed_ANSI/Prefix=All/Obj=$(OBJVAL) XTRADEF = +POSIX = POSIX .else # VAXC .first @ @[.vms]fndvers.com "" "" "[.vms]descrip.mms" @@ -126,6 +128,7 @@ XTRADEF = XTRACCFLAGS = /Include=[]/Object=$(O) XTRADEF = LIBS2 = Sys$Share:VAXCRTL/Shareable +POSIX = .endif .endif @@ -267,7 +270,7 @@ all : base extras libmods utils podxform archcorefiles preplibrary perlpods @ $(NOOP) base : miniperl perl @ $(NOOP) -extras : Fcntl FileHandle IO Opcode libmods utils podxform +extras : Fcntl FileHandle IO Opcode $(POSIX) libmods utils podxform @ $(NOOP) libmods : [.lib]Config.pm $(ARCHDIR)Config.pm [.lib]DynaLoader.pm [.lib.VMS]Filespec.pm @ $(NOOP) @@ -439,6 +442,25 @@ Fcntl : [.lib]Fcntl.pm [.lib.auto.Fcntl]Fcntl$(E) [.ext.Fcntl]Descrip.MMS : [.ext.Fcntl]Makefile.PL $(ARCHDIR)Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm $(DBG)perlshr$(E) $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.Fcntl]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]" +POSIX : [.lib]POSIX.pm [.lib.auto.POSIX]POSIX$(E) + @ $(NOOP) + +[.lib]POSIX.pm : [.ext.POSIX]Descrip.MMS + @ If F$Search("[.lib]auto.dir").eqs."" Then Create/Directory [.lib.auto] + @ Set Default [.ext.POSIX] + $(MMS) + @ Set Default [--] + +[.lib.auto.POSIX]POSIX$(E) : [.ext.POSIX]Descrip.MMS + @ Set Default [.ext.POSIX] + $(MMS) + @ Set Default [--] + +# Add "-I[--.lib]" t $(MINIPERL) so we use this copy of lib after C<chdir> +# ${@} necessary to distract different versions of MM[SK]/make +[.ext.POSIX]Descrip.MMS : [.ext.POSIX]Makefile.PL $(ARCHDIR)Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm $(DBG)perlshr$(E) + $(MINIPERL) "-I[--.lib]" -e "chdir('[.ext.POSIX]') or die $!; do 'Makefile.PL'; print ${@} if ${@};" "INST_LIB=[--.lib]" "INST_ARCHLIB=[--.lib]" + IO : [.lib]IO.pm [.lib.IO]File.pm [.lib.IO]Handle.pm [.lib.IO]Pipe.pm [.lib.IO]Seekable.pm [.lib.IO]Socket.pm [.lib.auto.IO]IO$(E) @ $(NOOP) @@ -1585,6 +1607,11 @@ clean : tidy Set Default [.ext.Opcode] - $(MMS) clean Set Default [--] +.ifdef DECC + Set Default [.ext.POSIX] + - $(MMS) clean + Set Default [--] +.endif - 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;* @@ -1618,6 +1645,11 @@ realclean : clean Set Default [.ext.Opcode] - $(MMS) realclean Set Default [--] +.ifdef DECC + Set Default [.ext.POSIX] + - $(MMS) realclean + Set Default [--] +.endif - 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/Stdio/Stdio.pm b/vms/ext/Stdio/Stdio.pm index 275081329c..af71f0bb9e 100644 --- a/vms/ext/Stdio/Stdio.pm +++ b/vms/ext/Stdio/Stdio.pm @@ -32,13 +32,15 @@ sub AUTOLOAD { if ($constname =~ /^O_/) { my($val) = constant($constname); defined $val or croak("Unknown VMS::Stdio constant $constname"); - *$AUTOLOAD = sub { $val }; } else { # We don't know about it; hand off to IO::File require IO::File; my($obj) = shift(@_); - $obj->IO::File::$constname(@_); + + my($val) = eval "\$obj->IO::File::$constname(@_)"; + croak "Error autoloading $constname: $@" if $@; } + *$AUTOLOAD = sub { $val }; goto &$AUTOLOAD; } diff --git a/vms/ext/Stdio/Stdio.xs b/vms/ext/Stdio/Stdio.xs index 79eb95335e..a1ec91f500 100644 --- a/vms/ext/Stdio/Stdio.xs +++ b/vms/ext/Stdio/Stdio.xs @@ -79,8 +79,8 @@ IV *pval; static SV * newFH(FILE *fp, char type) { - SV *rv, *gv = NEWSV(0,0); - GV **stashp; + SV *rv; + GV **stashp, *gv = (GV *)NEWSV(0,0); HV *stash; IO *io; @@ -102,7 +102,7 @@ newFH(FILE *fp, char type) { IoIFP(io) = fp; if (type != '>') IoOFP(io) = fp; IoTYPE(io) = type; - rv = newRV(gv); + rv = newRV((SV *)gv); SvREFCNT_dec(gv); return sv_bless(rv,stash); } diff --git a/vms/genconfig.pl b/vms/genconfig.pl index 17ff2041fa..d2ab5777de 100644 --- a/vms/genconfig.pl +++ b/vms/genconfig.pl @@ -266,7 +266,7 @@ while (<IN>) { elsif (not length $val and not $had_val) { # Wups -- should have been shell var for C preprocessor directive warn "Constant $token not found in config_h.SH\n"; - $token =~ tr/A-Z/a-z/; + $token = lc $token; $token = "d_$token" unless $token =~ /^i_/; print OUT "$token='$state'\n"; } @@ -282,7 +282,7 @@ while (<IN>) { } elsif (!$pp_vars{$token}) { # Haven't seen it previously, either warn "Constant $token not found in config_h.SH (val=|$val|)\n"; - $token =~ tr/A-Z/a-z/; + $token = lc $token; print OUT "$token='$val'\n"; if ($token =~ s/exp$//) {print OUT "$token='$val'\n";} } diff --git a/vms/perlvms.pod b/vms/perlvms.pod index f15bd77cfe..b56d202a7b 100644 --- a/vms/perlvms.pod +++ b/vms/perlvms.pod @@ -238,6 +238,7 @@ directory specifications may use either VMS or Unix syntax. Perl for VMS supports redirection of input and output on the command line, using a subset of Bourne shell syntax: + <F<file> reads stdin from F<file>, >F<file> writes stdout to F<file>, >>F<file> appends stdout to F<file>, @@ -261,6 +262,8 @@ to pass uppercase switches to Perl, you need to enclose them in double-quotes on the command line, since the CRTL downcases all unquoted strings. +=over 4 + =item -i If the C<-i> switch is present but no extension for a backup @@ -286,6 +289,8 @@ The C<-u> switch causes the VMS debugger to be invoked after the Perl program is compiled, but before it has run. It does not create a core dump file. +=back + =head1 Perl functions As of the time this document was last revised, the following @@ -337,6 +342,7 @@ your copy of Perl: getsockopt, listen, recv, select(system call)*, send, setsockopt, shutdown, socket +=over 4 =item File tests @@ -605,8 +611,17 @@ and you invoked Perl with the C<-w> switch, a warning will be issued.) The FLAGS argument is ignored in all cases. +=back + =head1 Perl variables +The following VMS-specific information applies to the indicated +"special" Perl variables, in addition to the general information +in L<perlvar>. Where there is a conflict, this infrmation +takes precedence. + +=over 4 + =item %ENV Reading the elements of the %ENV array returns the @@ -699,6 +714,8 @@ all the way to disk on each write (I<i.e.> not just to the underlying RMS buffers for a file). In other words, it's equivalent to calling fflush() and fsync() from C. +=back + =head1 Revision date This document was last updated on 28-Feb-1996, for Perl 5, diff --git a/vms/test.com b/vms/test.com index 156b2dca81..2afe93cd60 100644 --- a/vms/test.com +++ b/vms/test.com @@ -137,6 +137,8 @@ while ($test = shift) { close(script); if (/#!..perl(.*)/) { $switch = $1; + # Add "" to protect uppercase switches on command line + $switch =~ s/-([A-Z]\S*)/"-$1"/g; } else { $switch = ''; } @@ -2,8 +2,8 @@ * * VMS-specific routines for perl5 * - * Last revised: 18-Jul-1996 by Charles Bailey bailey@genetics.upenn.edu - * Version: 5.3.1 + * Last revised: 14-Oct-1996 by Charles Bailey bailey@genetics.upenn.edu + * Version: 5.3.7 */ #include <acedef.h> @@ -119,7 +119,7 @@ char * my_getenv(char *lnm) { static char __my_getenv_eqv[LNM$C_NAMLENGTH+1]; - char uplnm[LNM$C_NAMLENGTH], *cp1, *cp2; + char uplnm[LNM$C_NAMLENGTH+1], *cp1, *cp2; unsigned long int idx = 0; int trnsuccess; @@ -3020,7 +3020,7 @@ struct tm * my_gmtime(const time_t *time) { static int gmtime_emulation_type; - static time_t utc_offset_secs; + static long int utc_offset_secs; char *p; time_t when; @@ -3032,7 +3032,7 @@ my_gmtime(const time_t *time) if ((p = my_getenv("SYS$TIMEZONE_DIFFERENTIAL")) == NULL) gmtime_emulation_type++; else - utc_offset_secs = (time_t) atol(p); + utc_offset_secs = atol(p); } } |