diff src/sysdep.c @ 592:4f6ba8f1fb3d

[xemacs-hg @ 2001-05-31 12:03:37 by adrian] [PATCH] Fix time preservation in (copy-file ...) on native Windows <1yp8gt63.fsf@rapier.ecf.teradyne.com>
author adrian
date Thu, 31 May 2001 12:03:39 +0000
parents 183866b06e0b
children 023b83f4e54b
line wrap: on
line diff
--- a/src/sysdep.c	Thu May 31 02:05:18 2001 +0000
+++ b/src/sysdep.c	Thu May 31 12:03:39 2001 +0000
@@ -3378,17 +3378,26 @@
    access to those functions goes through the following. */
 
 int
-set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime)
+set_file_times (Lisp_Object path, EMACS_TIME atime, EMACS_TIME mtime)
 {
-#if defined (HAVE_UTIME)
+#if defined (WIN32_NATIVE)
   struct utimbuf utb;
   utb.actime = EMACS_SECS (atime);
   utb.modtime = EMACS_SECS (mtime);
+  return mswindows_utime (path, &utb);
+#elif defined (HAVE_UTIME)
+  struct utimbuf utb;
+  Extbyte *filename;
+  utb.actime = EMACS_SECS (atime);
+  utb.modtime = EMACS_SECS (mtime);
+  LISP_STRING_TO_EXTERNAL (path, filename, Qfile_name);
   return utime (filename, &utb);
 #elif defined (HAVE_UTIMES)
   struct timeval tv[2];
+  Extbyte *filename;
   tv[0] = atime;
   tv[1] = mtime;
+  LISP_STRING_TO_EXTERNAL (path, filename, Qfile_name);
   return utimes (filename, tv);
 #else
   /* No file times setting function available. */