diff options
| author | Richard M. Stallman | 1994-09-25 00:40:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-09-25 00:40:46 +0000 |
| commit | 8334eb211b99a15d491404bfca1cff991a7494ed (patch) | |
| tree | 82831000a8a8d19b4cea761f1731b8789f4fcf30 /src | |
| parent | 6b4b91a4c1d88b47a856ba3f7404024895562145 (diff) | |
| download | emacs-8334eb211b99a15d491404bfca1cff991a7494ed.tar.gz emacs-8334eb211b99a15d491404bfca1cff991a7494ed.zip | |
(set_file_times): Don't test HAVE_UTIME.
Assume utime exists if utimes does not.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index fe31b599830..cace5fa4ac1 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -3355,16 +3355,15 @@ readdirver (dirp) | |||
| 3355 | 3355 | ||
| 3356 | int | 3356 | int |
| 3357 | set_file_times (path, atime, mtime) | 3357 | set_file_times (path, atime, mtime) |
| 3358 | char *path; | 3358 | char *filename; |
| 3359 | EMACS_TIME atime, mtime; | 3359 | EMACS_TIME atime, mtime; |
| 3360 | { | 3360 | { |
| 3361 | #ifdef HAVE_UTIMES | 3361 | #ifdef HAVE_UTIMES |
| 3362 | struct timeval tv[2]; | 3362 | struct timeval tv[2]; |
| 3363 | tv[0] = atime; | 3363 | tv[0] = atime; |
| 3364 | tv[1] = mtime; | 3364 | tv[1] = mtime; |
| 3365 | return utimes (path, tv); | 3365 | return utimes (filename, tv); |
| 3366 | #else | 3366 | #else /* not HAVE_UTIMES */ |
| 3367 | #ifdef HAVE_UTIME | ||
| 3368 | #ifndef HAVE_STRUCT_UTIMBUF | 3367 | #ifndef HAVE_STRUCT_UTIMBUF |
| 3369 | struct utimbuf { | 3368 | struct utimbuf { |
| 3370 | long actime; | 3369 | long actime; |
| @@ -3374,12 +3373,8 @@ set_file_times (path, atime, mtime) | |||
| 3374 | struct utimbuf utb; | 3373 | struct utimbuf utb; |
| 3375 | utb.actime = EMACS_SECS (atime); | 3374 | utb.actime = EMACS_SECS (atime); |
| 3376 | utb.modtime = EMACS_SECS (mtime); | 3375 | utb.modtime = EMACS_SECS (mtime); |
| 3377 | return utime (path, &utb); | 3376 | return utime (filename, &utb); |
| 3378 | #else /* !HAVE_UTIMES && !HAVE_UTIME */ | 3377 | #endif /* not HAVE_UTIMES */ |
| 3379 | /* Should we set errno here? If so, set it to what? */ | ||
| 3380 | return -1; | ||
| 3381 | #endif | ||
| 3382 | #endif | ||
| 3383 | } | 3378 | } |
| 3384 | 3379 | ||
| 3385 | /* mkdir and rmdir functions, for systems which don't have them. */ | 3380 | /* mkdir and rmdir functions, for systems which don't have them. */ |