diff options
author | Dan Sugalski <sugalsd@lbcc.cc.or.us> | 1997-09-05 00:00:00 +0000 |
---|---|---|
committer | Tim Bunce <Tim.Bunce@ig.co.uk> | 1997-09-05 00:00:00 +0000 |
commit | 7b62b82bd65e5c25c8b1cad9ebeb185d3b61c873 (patch) | |
tree | 53ebf3efcaf09810a6ac313d0cfdd978feb54a8e /vms/vmsish.h | |
parent | 34d7b60e8af9fdce62d2ce3ffce87de14177f86e (diff) | |
download | perl-7b62b82bd65e5c25c8b1cad9ebeb185d3b61c873.tar.gz |
lib/timelocal.t fails test 1 for VMS 7.1
The VMS Perl port has local routines to handle time(), localtime(), and
gmtime(), because the implementations of these on VMS are broken for VMS
v6.2 and below. This implemetation gets strange for most of Jan 1, 1970
(From midnight to 4 PM), and behaves oddly for daylight savings time, but
only on OpenVMS 7.0 and 7.1.
The following patch disables the local versions of time(), localtime(), and
gmtime(), and uses the system provided versions, for OpenVMS 7.0 and up.
5.004_03 passes all tests with this patch. Tested on OpenVMS Alpha 7.1 and
6.2, and OpenVMS Vax 7.1, 6.2, and 5.5-2.
p5p-msgid: 3.0.3.32.19970908112449.0087bc90@stargate.lbcc.cc.or.us
Diffstat (limited to 'vms/vmsish.h')
-rw-r--r-- | vms/vmsish.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 *)); |