summaryrefslogtreecommitdiff
path: root/vms
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters@africa.nicoh.com>1997-04-17 00:00:00 +0000
committerChip Salzenberg <chip@atlantic.net>1997-04-17 00:00:00 +0000
commit96e4d5b14cf2dfb0235faa8bc3f701c15b15bb05 (patch)
tree573ae82e0e6a92c453a5b5cec1b10dc2f99362fe /vms
parent6877a1cf6ff3f0f711772ea75e579e2e7219cc46 (diff)
downloadperl-96e4d5b14cf2dfb0235faa8bc3f701c15b15bb05.tar.gz
[inseparable changes from match from perl-5.003_97e to perl-5.003_97f]
CORE LANGUAGE CHANGES Subject: New operator systell() From: Chip Salzenberg <chip@perl.com> Files: doio.c ext/Opcode/Opcode.pm keywords.pl opcode.pl pod/perldelta.pod pod/perldiag.pod pod/perlfunc.pod pp_sys.c t/op/sysio.t toke.c Subject: Allow constant sub to be optimized when called with parens From: Chip Salzenberg <chip@perl.com> Files: toke.c Subject: Make {,un}pack fail on invalid pack types From: Chip Salzenberg <chip@perl.com> Files: pod/perldiag.pod pp.c CORE PORTABILITY Subject: Fix bitwise ops and {,un}pack() on Cray CPUs From: Chip Salzenberg <chip@perl.com> Files: pp.c Subject: VMS update From: Charles Bailey <bailey@hmivax.humgen.upenn.edu> Files: lib/Cwd.pm lib/File/Path.pm lib/FindBin.pm vms/perly_c.vms vms/vms.c vms/writemain.pl Subject: Win32 update (three patches) From: Gurusamy Sarathy <gsar@engin.umich.edu> Files: lib/Cwd.pm lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_Win32.pm lib/File/Basename.pm win32/Makefile win32/makedef.pl win32/perllib.c win32/win32.c win32/win32iop.h DOCUMENTATION Subject: Document size restrictions for packed integers From: Jarkko Hietaniemi <Jarkko.Hietaniemi@cc.hut.fi> Files: pod/perlfunc.pod LIBRARY AND EXTENSIONS Subject: Fix bug in Opcode when (maxo & 15) > 8 From: Chip Salzenberg <chip@perl.com> Files: ext/Opcode/Makefile.PL ext/Opcode/Opcode.pm ext/Opcode/Opcode.xs
Diffstat (limited to 'vms')
-rw-r--r--vms/perly_c.vms4
-rw-r--r--vms/vms.c31
-rw-r--r--vms/writemain.pl3
3 files changed, 29 insertions, 9 deletions
diff --git a/vms/perly_c.vms b/vms/perly_c.vms
index 0949d5bf1d..c371e4b650 100644
--- a/vms/perly_c.vms
+++ b/vms/perly_c.vms
@@ -1631,8 +1631,8 @@ case 32:
#line 209 "perly.y"
{ copline = yyvsp[-9].ival;
yyval.opval = block_end(yyvsp[-7].ival,
- append_elem(OP_LINESEQ, scalar(yyvsp[-6].opval),
- newSTATEOP(0, yyvsp[-10].pval,
+ newSTATEOP(0, yyvsp[-10].pval,
+ append_elem(OP_LINESEQ, scalar(yyvsp[-6].opval),
newWHILEOP(0, 1, (LOOP*)Nullop,
scalar(yyvsp[-4].opval),
yyvsp[0].opval, scalar(yyvsp[-2].opval))))); }
diff --git a/vms/vms.c b/vms/vms.c
index 20710f7007..e1977fb861 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -2,8 +2,8 @@
*
* VMS-specific routines for perl5
*
- * Last revised: 15-Feb-1997 by Charles Bailey bailey@genetics.upenn.edu
- * Version: 5.3.27
+ * Last revised: 11-Apr-1997 by Charles Bailey bailey@genetics.upenn.edu
+ * Version: 5.3.97c
*/
#include <acedef.h>
@@ -774,15 +774,18 @@ my_gconvert(double val, int ndig, int trail, char *buf)
* rmesexpand() returns the address of the resultant string if
* successful, and NULL on error.
*/
+static char *do_tounixspec(char *, char *, int);
+
static char *
do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts)
{
static char __rmsexpand_retbuf[NAM$C_MAXRSS+1];
+ char vmsfspec[NAM$C_MAXRSS+1], tmpfspec[NAM$C_MAXRSS+1];
char esa[NAM$C_MAXRSS], *cp, *out = NULL;
struct FAB myfab = cc$rms_fab;
struct NAM mynam = cc$rms_nam;
STRLEN speclen;
- unsigned long int retsts, haslower = 0;
+ unsigned long int retsts, haslower = 0, isunix = 0;
if (!filespec || !*filespec) {
set_vaxc_errno(LIB$_INVARG); set_errno(EINVAL);
@@ -792,12 +795,20 @@ do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts)
if (ts) out = New(7019,outbuf,NAM$C_MAXRSS+1,char);
else outbuf = __rmsexpand_retbuf;
}
+ if ((isunix = (strchr(filespec,'/') != NULL))) {
+ if (do_tovmsspec(filespec,vmsfspec,0) == NULL) return NULL;
+ filespec = vmsfspec;
+ }
myfab.fab$l_fna = filespec;
myfab.fab$b_fns = strlen(filespec);
myfab.fab$l_nam = &mynam;
if (defspec && *defspec) {
+ if (strchr(defspec,'/') != NULL) {
+ if (do_tovmsspec(defspec,tmpfspec,0) == NULL) return NULL;
+ defspec = tmpfspec;
+ }
myfab.fab$l_dna = defspec;
myfab.fab$b_dns = strlen(defspec);
}
@@ -852,7 +863,17 @@ do_rmsexpand(char *filespec, char *outbuf, int ts, char *defspec, unsigned opts)
if (haslower) __mystrtolower(out);
/* Have we been working with an expanded, but not resultant, spec? */
- if (!mynam.nam$b_rsl) strcpy(outbuf,esa);
+ /* Also, convert back to Unix syntax if necessary. */
+ if (!mynam.nam$b_rsl) {
+ if (isunix) {
+ if (do_tounixspec(esa,outbuf,0) == NULL) return NULL;
+ }
+ else strcpy(outbuf,esa);
+ }
+ else if (isunix) {
+ if (do_tounixspec(outbuf,tmpfspec,0) == NULL) return NULL;
+ strcpy(outbuf,tmpfspec);
+ }
return outbuf;
}
/*}}}*/
@@ -897,8 +918,6 @@ char *rmsexpand_ts(char *spec, char *buf, char *def, unsigned opt)
** found in the Perl standard distribution.
*/
-static char *do_tounixspec(char *, char *, int);
-
/*{{{ char *fileify_dirspec[_ts](char *path, char *buf)*/
static char *do_fileify_dirspec(char *dir,char *buf,int ts)
{
diff --git a/vms/writemain.pl b/vms/writemain.pl
index 5f1c8bf0d3..a502d6131e 100644
--- a/vms/writemain.pl
+++ b/vms/writemain.pl
@@ -36,7 +36,6 @@ print OUT <<'EOH';
static void
xs_init()
{
- dXSUB_SYS;
EOH
if (@ARGV) {
@@ -53,6 +52,8 @@ if (@exts) {
$subname =~ s/::/__/g;
print OUT "extern void boot_${subname} _((CV* cv));\n"
}
+ # May not actually be a declaration, so put after other declarations
+ print OUT " dXSUB_SYS;\n";
foreach $ext (@exts) {
my($subname) = $ext;
$subname =~ s/::/__/g;