comparison src/sysdep.c @ 460:223736d75acb r21-2-45

Import from CVS: tag r21-2-45
author cvs
date Mon, 13 Aug 2007 11:43:24 +0200
parents 3d3049ae1304
children 0784d089fdc9
comparison
equal deleted inserted replaced
459:9d4fd877b885 460:223736d75acb
136 136
137 #ifdef AIXHFT 137 #ifdef AIXHFT
138 static void hft_init (struct console *c); 138 static void hft_init (struct console *c);
139 static void hft_reset (struct console *c); 139 static void hft_reset (struct console *c);
140 #include <sys/termio.h> 140 #include <sys/termio.h>
141 #endif
142
143 /* ------------------------------- */
144 /* miscellaneous */
145 /* ------------------------------- */
146
147 #ifndef HAVE_UTIMES
148 #ifndef HAVE_STRUCT_UTIMBUF
149 /* We want to use utime rather than utimes, but we couldn't find the
150 structure declaration. We'll use the traditional one. */
151 struct utimbuf
152 {
153 long actime;
154 long modtime;
155 };
156 #endif
157 #endif 141 #endif
158 142
159 143
160 /************************************************************************/ 144 /************************************************************************/
161 /* subprocess control */ 145 /* subprocess control */
3362 access to those functions goes through the following. */ 3346 access to those functions goes through the following. */
3363 3347
3364 int 3348 int
3365 set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime) 3349 set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime)
3366 { 3350 {
3367 #ifdef HAVE_UTIMES 3351 #if defined (HAVE_UTIME)
3352 struct utimbuf utb;
3353 utb.actime = EMACS_SECS (atime);
3354 utb.modtime = EMACS_SECS (mtime);
3355 return utime (filename, &utb);
3356 #elif defined (HAVE_UTIMES)
3368 struct timeval tv[2]; 3357 struct timeval tv[2];
3369 tv[0] = atime; 3358 tv[0] = atime;
3370 tv[1] = mtime; 3359 tv[1] = mtime;
3371 return utimes (filename, tv); 3360 return utimes (filename, tv);
3372 #else /* not HAVE_UTIMES */ 3361 #else
3373 struct utimbuf utb; 3362 /* No file times setting function available. */
3374 utb.actime = EMACS_SECS (atime); 3363 return -1;
3375 utb.modtime = EMACS_SECS (mtime); 3364 #endif
3376 return utime (filename, &utb);
3377 #endif /* not HAVE_UTIMES */
3378 } 3365 }
3379 3366
3380 /* */ 3367 /* */
3381 3368
3382 static long ticks_per_second; 3369 static long ticks_per_second;