Mercurial > hg > xemacs-beta
comparison src/systime.h @ 410:de805c49cfc1 r21-2-35
Import from CVS: tag r21-2-35
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:19:21 +0200 |
parents | 74fd4e045ea6 |
children | 697ef44129c6 |
comparison
equal
deleted
inserted
replaced
409:301b9ebbdf3b | 410:de805c49cfc1 |
---|---|
22 | 22 |
23 #ifndef INCLUDED_systime_h_ | 23 #ifndef INCLUDED_systime_h_ |
24 #define INCLUDED_systime_h_ | 24 #define INCLUDED_systime_h_ |
25 | 25 |
26 #ifdef TIME_WITH_SYS_TIME | 26 #ifdef TIME_WITH_SYS_TIME |
27 #include <sys/time.h> | 27 # include <sys/time.h> |
28 #include <time.h> | 28 # include <time.h> |
29 #else | 29 #else |
30 #ifdef HAVE_SYS_TIME_H | 30 # ifdef HAVE_SYS_TIME_H |
31 #include <sys/time.h> | 31 # include <sys/time.h> |
32 #else | 32 # else |
33 #include <time.h> | 33 # include <time.h> |
34 #endif | 34 # endif |
35 #endif | 35 #endif |
36 | 36 |
37 /* select() is supposed to be (Unix98) defined in sys/time.h, | 37 /* select() is supposed to be (Unix98) defined in sys/time.h, |
38 but FreeBSD and Irix 5 put it in unistd.h instead. | 38 but FreeBSD and Irix 5 put it in unistd.h instead. |
39 If we have it, including it can't hurt. */ | 39 If we have it, including it can't hurt. */ |
40 #ifdef HAVE_UNISTD_H | 40 #ifdef HAVE_UNISTD_H |
41 #include <unistd.h> | 41 #include <unistd.h> |
42 #endif | 42 #endif |
43 | 43 |
44 #if defined(WINDOWSNT) && defined(HAVE_X_WINDOWS) | 44 #ifdef WIN32_NATIVE |
45 | |
46 /* This defines struct timeval */ | |
47 #include <winsock.h> | |
48 | |
49 struct timezone | |
50 { | |
51 int tz_minuteswest; /* minutes west of Greenwich */ | |
52 int tz_dsttime; /* type of dst correction */ | |
53 }; | |
54 | |
55 #ifdef HAVE_X_WINDOWS | |
45 /* Provides gettimeofday etc */ | 56 /* Provides gettimeofday etc */ |
46 #include <X11/Xw32defs.h> | 57 #include <X11/Xw32defs.h> |
47 #include <X11/Xos.h> | 58 #include <X11/Xos.h> |
48 #endif | 59 #else |
60 /* X11R6 on NT provides the single parameter version of this command */ | |
61 void gettimeofday (struct timeval *, struct timezone *); | |
62 #endif /* HAVE_X_WINDOWS */ | |
63 | |
64 #endif /* WIN32_NATIVE */ | |
49 | 65 |
50 #ifdef HAVE_UTIME_H | 66 #ifdef HAVE_UTIME_H |
51 # include <utime.h> | 67 # include <utime.h> |
52 #endif | 68 #endif |
53 | 69 |
54 #if defined(HAVE_TZNAME) && !defined(WINDOWSNT) && !defined(__CYGWIN32__) | 70 #if defined(HAVE_TZNAME) && !defined(WIN32_NATIVE) && !defined(CYGWIN) |
55 #ifndef tzname /* For SGI. */ | 71 #ifndef tzname /* For SGI. */ |
56 extern char *tzname[]; /* RS6000 and others want it this way. */ | 72 extern char *tzname[]; /* RS6000 and others want it this way. */ |
57 #endif | 73 #endif |
58 #endif | 74 #endif |
59 | 75 |
215 int set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime); | 231 int set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime); |
216 | 232 |
217 void get_process_times (double *user_time, double *system_time, | 233 void get_process_times (double *user_time, double *system_time, |
218 double *real_time); | 234 double *real_time); |
219 | 235 |
220 #if defined(WINDOWSNT) || defined(BROKEN_CYGWIN) || defined(__MINGW32__) | 236 #if defined(WIN32_NATIVE) || defined(BROKEN_CYGWIN) |
221 | 237 |
222 /* setitimer emulation for Win32 (see nt.c) */ | 238 /* setitimer emulation for Win32 (see nt.c) */ |
223 | 239 |
224 struct itimerval | 240 struct itimerval |
225 { | 241 { |
231 struct itimerval* itold); | 247 struct itimerval* itold); |
232 | 248 |
233 #define ITIMER_REAL 1 | 249 #define ITIMER_REAL 1 |
234 #define ITIMER_PROF 2 | 250 #define ITIMER_PROF 2 |
235 | 251 |
236 #endif /* WINDOWSNT */ | 252 #endif /* WIN32_NATIVE */ |
237 | 253 |
238 #endif /* INCLUDED_systime_h_ */ | 254 #endif /* INCLUDED_systime_h_ */ |