Commit 8334eb21 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(set_file_times): Don't test HAVE_UTIME.

Assume utime exists if utimes does not.
parent 6b4b91a4
...@@ -3355,16 +3355,15 @@ readdirver (dirp) ...@@ -3355,16 +3355,15 @@ readdirver (dirp)
int int
set_file_times (path, atime, mtime) set_file_times (path, atime, mtime)
char *path; char *filename;
EMACS_TIME atime, mtime; EMACS_TIME atime, mtime;
{ {
#ifdef HAVE_UTIMES #ifdef HAVE_UTIMES
struct timeval tv[2]; struct timeval tv[2];
tv[0] = atime; tv[0] = atime;
tv[1] = mtime; tv[1] = mtime;
return utimes (path, tv); return utimes (filename, tv);
#else #else /* not HAVE_UTIMES */
#ifdef HAVE_UTIME
#ifndef HAVE_STRUCT_UTIMBUF #ifndef HAVE_STRUCT_UTIMBUF
struct utimbuf { struct utimbuf {
long actime; long actime;
...@@ -3374,12 +3373,8 @@ set_file_times (path, atime, mtime) ...@@ -3374,12 +3373,8 @@ set_file_times (path, atime, mtime)
struct utimbuf utb; struct utimbuf utb;
utb.actime = EMACS_SECS (atime); utb.actime = EMACS_SECS (atime);
utb.modtime = EMACS_SECS (mtime); utb.modtime = EMACS_SECS (mtime);
return utime (path, &utb); return utime (filename, &utb);
#else /* !HAVE_UTIMES && !HAVE_UTIME */ #endif /* not HAVE_UTIMES */
/* Should we set errno here? If so, set it to what? */
return -1;
#endif
#endif
} }
/* mkdir and rmdir functions, for systems which don't have them. */ /* mkdir and rmdir functions, for systems which don't have them. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment