diff options
author | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-16 11:09:25 +0000 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1997-10-16 11:09:25 +0000 |
commit | d58bf5aa3d3631a46847733b1ff1985b30140228 (patch) | |
tree | 406c095d697ae0ae82bbf187e5c65151bd41232a /vms | |
parent | c7848ba184fac8eca4125f4296d6e09fee2c1846 (diff) | |
parent | 50e27ac33704d6fb34d4be7cfb426b2097b27505 (diff) | |
download | perl-d58bf5aa3d3631a46847733b1ff1985b30140228.tar.gz |
Merge maint-5.004 branch (5.004_04) with mainline.
p4raw-id: //depot/perl@137
Diffstat (limited to 'vms')
-rw-r--r-- | vms/perly_c.vms | 24 | ||||
-rw-r--r-- | vms/vms.c | 9 | ||||
-rw-r--r-- | vms/vmsish.h | 6 |
3 files changed, 25 insertions, 14 deletions
diff --git a/vms/perly_c.vms b/vms/perly_c.vms index d0c8fa18f4..1344fae31e 100644 --- a/vms/perly_c.vms +++ b/vms/perly_c.vms @@ -1646,7 +1646,7 @@ case 27: yyval.opval = block_end(yyvsp[-4].ival, newSTATEOP(0, yyvsp[-7].pval, newWHILEOP(0, 1, (LOOP*)Nullop, - yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); } + yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); } break; case 28: #line 192 "perly.y" @@ -1654,7 +1654,7 @@ case 28: yyval.opval = block_end(yyvsp[-4].ival, newSTATEOP(0, yyvsp[-7].pval, newWHILEOP(0, 1, (LOOP*)Nullop, - yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); } + yyvsp[-6].ival, yyvsp[-3].opval, yyvsp[-1].opval, yyvsp[0].opval))); } break; case 29: #line 198 "perly.y" @@ -1674,19 +1674,19 @@ case 31: break; case 32: #line 209 "perly.y" -{ copline = yyvsp[-9].ival; - yyval.opval = block_end(yyvsp[-7].ival, - 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))))); } +{ OP *forop = append_elem(OP_LINESEQ, + scalar(yyvsp[-6].opval), + newWHILEOP(0, 1, (LOOP*)Nullop, + yyvsp[-9].ival, scalar(yyvsp[-4].opval), + yyvsp[0].opval, scalar(yyvsp[-2].opval))); + copline = yyvsp[-9].ival; + yyval.opval = block_end(yyvsp[-7].ival, newSTATEOP(0, yyvsp[-10].pval, forop)); } break; case 33: #line 217 "perly.y" -{ yyval.opval = newSTATEOP(0, - yyvsp[-2].pval, newWHILEOP(0, 1, (LOOP*)Nullop, - Nullop, yyvsp[-1].opval, yyvsp[0].opval)); } +{ yyval.opval = newSTATEOP(0, yyvsp[-2].pval, + newWHILEOP(0, 1, (LOOP*)Nullop, + NOLINE, Nullop, yyvsp[-1].opval, yyvsp[0].opval)); } break; case 34: #line 223 "perly.y" @@ -3178,7 +3178,7 @@ void my_endpwent() } /*}}}*/ - +#if __VMS_VER < 70000000 || __DECC_VER < 50200000 /* Used for UTC calculation in my_gmtime(), my_localtime(), my_time(), * my_utime(), and flex_stat(), all of which operate on UTC unless * VMSISH_TIMES is true. @@ -3307,6 +3307,7 @@ my_localtime(const time_t *timep) #define localtime(t) my_localtime(t) #define time(t) my_time(t) +#endif /* VMS VER < 7.0 || Dec C < 5.2 /* my_utime - update modification time of a file * calling sequence is identical to POSIX utime(), but under @@ -3371,7 +3372,7 @@ int my_utime(char *file, struct utimbuf *utimes) */ lowbit = (utimes->modtime & 1) ? secscale : 0; unixtime = (long int) utimes->modtime; -# ifdef VMSISH_TIME +#if defined(VMSISH_TIME) && (__VMS_VER < 70000000 || __DECC_VER < 50200000) if (!VMSISH_TIME) { /* Input was UTC; convert to local for sys svc */ if (!gmtime_emulation_type) (void) time(NULL); /* Initialize UTC */ unixtime += utc_offset_secs; @@ -3723,10 +3724,12 @@ flex_fstat(int fd, struct mystat *statbufp) # else if (1) { # endif +#if __VMS_VER < 70000000 || __DECC_VER < 50200000 if (!gmtime_emulation_type) (void)time(NULL); statbufp->st_mtime -= utc_offset_secs; statbufp->st_atime -= utc_offset_secs; statbufp->st_ctime -= utc_offset_secs; +#endif } return 0; } @@ -3777,10 +3780,12 @@ flex_stat(char *fspec, struct mystat *statbufp) # else if (1) { # endif +#if __VMS_VER < 70000000 || __DECC_VER < 50200000 if (!gmtime_emulation_type) (void)time(NULL); statbufp->st_mtime -= utc_offset_secs; statbufp->st_atime -= utc_offset_secs; statbufp->st_ctime -= utc_offset_secs; +#endif } } return retval; diff --git a/vms/vmsish.h b/vms/vmsish.h index 81e3764a2c..2da1639baa 100644 --- a/vms/vmsish.h +++ b/vms/vmsish.h @@ -111,9 +111,11 @@ # define seekdir Perl_seekdir # define closedir Perl_closedir # define vmsreaddirversions Perl_vmsreaddirversions +#if __VMS_VER < 70000000 || __DECC_VER < 50200000 # define my_gmtime Perl_my_gmtime # define my_localtime Perl_my_localtime # define my_time Perl_my_time +#endif # define cando_by_name Perl_cando_by_name # define flex_fstat Perl_flex_fstat # define flex_stat Perl_flex_stat @@ -330,9 +332,11 @@ struct utimbuf { * in VMS 6.0 or later use. We also add shims for time() and localtime() * so we can run on UTC by default. */ +#if __VMS_VER < 70000000 || __DECC_VER < 50200000 #define gmtime(t) my_gmtime(t) #define localtime(t) my_localtime(t) #define time(t) my_time(t) +#endif /* VMS doesn't use a real sys_nerr, but we need this when scanning for error * messages in text strings . . . @@ -532,9 +536,11 @@ long telldir _((DIR *)); void seekdir _((DIR *, long)); void closedir _((DIR *)); void vmsreaddirversions _((DIR *, int)); +#ifdef my_gmtime struct tm * my_gmtime _((const time_t *)); struct tm * my_localtime _((const time_t *)); time_t my_time _((time_t *)); +#endif /* We're assuming these three come as a package */ I32 cando_by_name _((I32, I32, char *)); int flex_fstat _((int, struct mystat *)); int flex_stat _((char *, struct mystat *)); |