diff options
| author | Karl Heuer | 1994-09-18 19:15:39 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-09-18 19:15:39 +0000 |
| commit | c0c4505967b4ba8e0598b002dc6163dff5cadf2e (patch) | |
| tree | 6e2c3259f31b63f0c11d43776f90bcc2fc578fda /src | |
| parent | 546ec8fb4ceaf02fef96a176a82f9d61bb5a471b (diff) | |
| download | emacs-c0c4505967b4ba8e0598b002dc6163dff5cadf2e.tar.gz emacs-c0c4505967b4ba8e0598b002dc6163dff5cadf2e.zip | |
Declare set_file_times.
Diffstat (limited to 'src')
| -rw-r--r-- | src/systime.h | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/systime.h b/src/systime.h index 188a4743f32..2c9966dee47 100644 --- a/src/systime.h +++ b/src/systime.h | |||
| @@ -27,6 +27,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 27 | #include <time.h> | 27 | #include <time.h> |
| 28 | #endif | 28 | #endif |
| 29 | #endif | 29 | #endif |
| 30 | #ifdef HAVE_UTIME_H | ||
| 31 | #include <utime.h> | ||
| 32 | #endif | ||
| 30 | 33 | ||
| 31 | #ifdef HAVE_TZNAME | 34 | #ifdef HAVE_TZNAME |
| 32 | #ifndef tzname /* For SGI. */ | 35 | #ifndef tzname /* For SGI. */ |
| @@ -72,9 +75,6 @@ extern long timezone; | |||
| 72 | 75 | ||
| 73 | EMACS_GET_TIME (TIME) stores the current system time in TIME, which | 76 | EMACS_GET_TIME (TIME) stores the current system time in TIME, which |
| 74 | should be an lvalue. | 77 | should be an lvalue. |
| 75 | EMACS_SET_UTIMES (PATH, ATIME, MTIME) changes the last-access and | ||
| 76 | last-modification times of the file named PATH to ATIME and | ||
| 77 | MTIME, which are EMACS_TIMEs. | ||
| 78 | 78 | ||
| 79 | EMACS_ADD_TIME (DEST, SRC1, SRC2) adds SRC1 to SRC2 and stores the | 79 | EMACS_ADD_TIME (DEST, SRC1, SRC2) adds SRC1 to SRC2 and stores the |
| 80 | result in DEST. SRC should not be negative. | 80 | result in DEST. SRC should not be negative. |
| @@ -148,24 +148,4 @@ extern long timezone; | |||
| 148 | #define EMACS_SET_SECS_USECS(time, secs, usecs) \ | 148 | #define EMACS_SET_SECS_USECS(time, secs, usecs) \ |
| 149 | (EMACS_SET_SECS (time, secs), EMACS_SET_USECS (time, usecs)) | 149 | (EMACS_SET_SECS (time, secs), EMACS_SET_USECS (time, usecs)) |
| 150 | 150 | ||
| 151 | #ifdef USE_UTIME | 151 | extern int set_file_times (); |
| 152 | |||
| 153 | #define EMACS_SET_UTIMES(path, atime, mtime) \ | ||
| 154 | { \ | ||
| 155 | time_t tv[2]; \ | ||
| 156 | tv[0] = EMACS_SECS (atime); \ | ||
| 157 | tv[1] = EMACS_SECS (mtime); \ | ||
| 158 | utime ((path), tv); \ | ||
| 159 | } | ||
| 160 | |||
| 161 | #else /* ! defined (USE_UTIME) */ | ||
| 162 | |||
| 163 | #define EMACS_SET_UTIMES(path, atime, mtime) \ | ||
| 164 | { \ | ||
| 165 | EMACS_TIME tv[2]; \ | ||
| 166 | tv[0] = atime; \ | ||
| 167 | tv[1] = mtime; \ | ||
| 168 | utimes ((path), tv); \ | ||
| 169 | } | ||
| 170 | |||
| 171 | #endif /* ! defined (USE_UTIME) */ | ||