$ GOSUB inhdr
$ i_unistd = tmp
$!
+$! Check to see if we've got utime.h (which we should use if we have)
+$!
+$ i_netdb = "undef"
+$ tmp = "utime.h"
+$ GOSUB inhdr
+$ i_utime = tmp
+$!
$! do we have getppid()?
$!
$ IF i_unistd .EQS. "define"
$ WC "i_time='define'"
$ WC "i_unistd='" + i_unistd + "'"
$ WC "i_ustat='undef'"
-$ WC "i_utime='undef'"
+$ WC "i_utime='" + i_utime + "'"
$ WC "i_values='undef'"
$ WC "i_varargs='undef'"
$ WC "i_vfork='undef'"
devdsc = {0,DSC$K_DTYPE_T, DSC$K_CLASS_S,0},
fnmdsc = {0,DSC$K_DTYPE_T, DSC$K_CLASS_S,0};
+ if (decc_efs_charset != 0) {
+ struct utimbuf utc_utimes;
+
+ utc_utimes.actime = utimes->actime;
+ utc_utimes.modtime = utimes->modtime;
+# ifdef VMSISH_TIME
+ /* If input was local; convert to UTC for sys svc */
+ if (VMSISH_TIME) {
+ utc_utimes.actime = _toutc(utimes->actime);
+ utc_utimes.modtime = _toutc(utimes->modtime);
+ }
+# endif
+ sts = utime(file, &utc_utimes);
+ return sts;
+ }
+
if (file == NULL || *file == '\0') {
set_errno(ENOENT);
set_vaxc_errno(LIB$_INVARG);
return -1;
}
- if (do_tovmsspec(file,vmsspec,0) == NULL) return -1;
+
+ /* Convert to VMS format ensuring that it will fit in 255 characters */
+ if (do_rmsexpand(file, vmsspec, 0, NULL, PERL_RMSEXPAND_M_VMS) == NULL)
+ return -1;
if (utimes != NULL) {
/* Convert Unix time (seconds since 01-JAN-1970 00:00:00.00)
# include <signal.h>
#define ABORT() abort()
+#ifdef I_UTIME
+#include <utime.h>
+#else
/* Used with our my_utime() routine in vms.c */
struct utimbuf {
time_t actime;
time_t modtime;
};
+#endif
+#ifndef DONT_MASK_RTL_CALLS
#define utime my_utime
+#endif
/* This is what times() returns, but <times.h> calls it tbuffer_t on VMS
* prior to v7.0. We check the DECC manifest to see whether it's already