diff options
| author | Karl Heuer | 1994-10-02 21:51:57 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-10-02 21:51:57 +0000 |
| commit | d79998bcf9893b0c985909774cb04dedd501444d (patch) | |
| tree | d8d56c111562fd0e69079e94b7fc2a79088a5bdf /src | |
| parent | a67fa8993066f30d60d8353dff949cb91b433586 (diff) | |
| download | emacs-d79998bcf9893b0c985909774cb04dedd501444d.tar.gz emacs-d79998bcf9893b0c985909774cb04dedd501444d.zip | |
Include <utime.h> here instead of in systime.h.
(set_file_times): Move struct declaration to top of file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sysdep.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/sysdep.c b/src/sysdep.c index 3b2b2f613b3..a696e2192d4 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -156,6 +156,20 @@ extern int quit_char; | |||
| 156 | 156 | ||
| 157 | #include "syssignal.h" | 157 | #include "syssignal.h" |
| 158 | #include "systime.h" | 158 | #include "systime.h" |
| 159 | #ifdef HAVE_UTIME_H | ||
| 160 | #include <utime.h> | ||
| 161 | #endif | ||
| 162 | |||
| 163 | #ifndef HAVE_UTIMES | ||
| 164 | #ifndef HAVE_STRUCT_UTIMBUF | ||
| 165 | /* We want to use utime rather than utimes, but we couldn't find the | ||
| 166 | structure declaration. We'll use the traditional one. */ | ||
| 167 | struct utimbuf { | ||
| 168 | long actime; | ||
| 169 | long modtime; | ||
| 170 | }; | ||
| 171 | #endif | ||
| 172 | #endif | ||
| 159 | 173 | ||
| 160 | /* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */ | 174 | /* LPASS8 is new in 4.3, and makes cbreak mode provide all 8 bits. */ |
| 161 | #ifndef LPASS8 | 175 | #ifndef LPASS8 |
| @@ -3364,12 +3378,6 @@ set_file_times (filename, atime, mtime) | |||
| 3364 | tv[1] = mtime; | 3378 | tv[1] = mtime; |
| 3365 | return utimes (filename, tv); | 3379 | return utimes (filename, tv); |
| 3366 | #else /* not HAVE_UTIMES */ | 3380 | #else /* not HAVE_UTIMES */ |
| 3367 | #ifndef HAVE_STRUCT_UTIMBUF | ||
| 3368 | struct utimbuf { | ||
| 3369 | long actime; | ||
| 3370 | long modtime; | ||
| 3371 | }; | ||
| 3372 | #endif | ||
| 3373 | struct utimbuf utb; | 3381 | struct utimbuf utb; |
| 3374 | utb.actime = EMACS_SECS (atime); | 3382 | utb.actime = EMACS_SECS (atime); |
| 3375 | utb.modtime = EMACS_SECS (mtime); | 3383 | utb.modtime = EMACS_SECS (mtime); |