diff options
| author | Karl Heuer | 1994-09-20 04:07:48 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-20 04:07:48 +0000 |
| commit | 53ea491aa51386be2ce042efcfee47880dcc66f0 (patch) | |
| tree | 779f8aa617da703ada4518e10e4928628771a5ac /src | |
| parent | e4f74c7e882531505a0da7c24a19a9a3ade20bda (diff) | |
| download | emacs-53ea491aa51386be2ce042efcfee47880dcc66f0.tar.gz emacs-53ea491aa51386be2ce042efcfee47880dcc66f0.zip | |
(set_file_times): Move this out of the USG conditional.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 85076908f16..51cbb04fc4c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -3023,35 +3023,6 @@ rename (from, to) | |||
| 3023 | 3023 | ||
| 3024 | #endif | 3024 | #endif |
| 3025 | 3025 | ||
| 3026 | int | ||
| 3027 | set_file_times (path, atime, mtime) | ||
| 3028 | char *path; | ||
| 3029 | EMACS_TIME atime, mtime; | ||
| 3030 | { | ||
| 3031 | #ifdef HAVE_UTIMES | ||
| 3032 | struct timeval tv[2]; | ||
| 3033 | tv[0] = atime; | ||
| 3034 | tv[1] = mtime; | ||
| 3035 | return utimes (path, tv); | ||
| 3036 | #else | ||
| 3037 | #ifdef HAVE_UTIME | ||
| 3038 | #ifndef HAVE_STRUCT_UTIMBUF | ||
| 3039 | struct utimbuf { | ||
| 3040 | long actime; | ||
| 3041 | long modtime; | ||
| 3042 | }; | ||
| 3043 | #endif | ||
| 3044 | struct utimbuf utb; | ||
| 3045 | utb.actime = EMACS_SECS (atime); | ||
| 3046 | utb.modtime = EMACS_SECS (mtime); | ||
| 3047 | return utime (path, &utb); | ||
| 3048 | #else /* !HAVE_UTIMES && !HAVE_UTIME */ | ||
| 3049 | /* Should we set errno here? If so, set it to what? */ | ||
| 3050 | return -1; | ||
| 3051 | #endif | ||
| 3052 | #endif | ||
| 3053 | } | ||
| 3054 | |||
| 3055 | 3026 | ||
| 3056 | #ifdef HPUX | 3027 | #ifdef HPUX |
| 3057 | #ifndef HAVE_PERROR | 3028 | #ifndef HAVE_PERROR |
| @@ -3391,6 +3362,35 @@ readdirver (dirp) | |||
| 3391 | #endif /* NONSYSTEM_DIR_LIBRARY */ | 3362 | #endif /* NONSYSTEM_DIR_LIBRARY */ |
| 3392 | 3363 | ||
| 3393 | 3364 | ||
| 3365 | int | ||
| 3366 | set_file_times (path, atime, mtime) | ||
| 3367 | char *path; | ||
| 3368 | EMACS_TIME atime, mtime; | ||
| 3369 | { | ||
| 3370 | #ifdef HAVE_UTIMES | ||
| 3371 | struct timeval tv[2]; | ||
| 3372 | tv[0] = atime; | ||
| 3373 | tv[1] = mtime; | ||
| 3374 | return utimes (path, tv); | ||
| 3375 | #else | ||
| 3376 | #ifdef HAVE_UTIME | ||
| 3377 | #ifndef HAVE_STRUCT_UTIMBUF | ||
| 3378 | struct utimbuf { | ||
| 3379 | long actime; | ||
| 3380 | long modtime; | ||
| 3381 | }; | ||
| 3382 | #endif | ||
| 3383 | struct utimbuf utb; | ||
| 3384 | utb.actime = EMACS_SECS (atime); | ||
| 3385 | utb.modtime = EMACS_SECS (mtime); | ||
| 3386 | return utime (path, &utb); | ||
| 3387 | #else /* !HAVE_UTIMES && !HAVE_UTIME */ | ||
| 3388 | /* Should we set errno here? If so, set it to what? */ | ||
| 3389 | return -1; | ||
| 3390 | #endif | ||
| 3391 | #endif | ||
| 3392 | } | ||
| 3393 | |||
| 3394 | /* mkdir and rmdir functions, for systems which don't have them. */ | 3394 | /* mkdir and rmdir functions, for systems which don't have them. */ |
| 3395 | 3395 | ||
| 3396 | #ifndef HAVE_MKDIR | 3396 | #ifndef HAVE_MKDIR |