aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii2017-05-15 22:45:57 +0300
committerEli Zaretskii2017-05-15 22:45:57 +0300
commit3241c84fd8cfa1e02472e52e6aefe2fff0726b3d (patch)
treedf8eae184ba8cd8ae44c19f298c7c200a548b2fe /nt
parentd23a486ba27405acfda67a4dc387ade5e399a29b (diff)
downloademacs-3241c84fd8cfa1e02472e52e6aefe2fff0726b3d.tar.gz
emacs-3241c84fd8cfa1e02472e52e6aefe2fff0726b3d.zip
Remove unneeded stuff from nt/inc/sys/time.h
* nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset) (timercmp, timerclear): Don't define. Instead, include the system header sys/time.h, and add only the interval timers stuff. This avoids compiler warnings about 'gettimeofday's prototype, and also avoids redefinition of macros from system headers.
Diffstat (limited to 'nt')
-rw-r--r--nt/inc/sys/time.h24
1 files changed, 1 insertions, 23 deletions
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h
index de06c116ced..6f67e5db4ed 100644
--- a/nt/inc/sys/time.h
+++ b/nt/inc/sys/time.h
@@ -1,29 +1,7 @@
1#ifndef SYS_TIME_H_INCLUDED 1#ifndef SYS_TIME_H_INCLUDED
2#define SYS_TIME_H_INCLUDED 2#define SYS_TIME_H_INCLUDED
3 3
4/* 4#include_next <sys/time.h>
5 * sys/time.h either doesn't exist on Windows, or doesn't necessarily
6 * have the below stuff.
7 */
8
9/* The guards are for MinGW64, which defines these structs on its
10 system headers which are included by ms-w32.h. */
11/* Allow inclusion of sys/time.h and winsock2.h in any order. Needed
12 for running the configure test, which is only relevant to MinGW. */
13#ifndef _TIMEVAL_DEFINED
14#define _TIMEVAL_DEFINED
15struct timeval
16{
17 long tv_sec; /* seconds */
18 long tv_usec; /* microseconds */
19};
20#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
21#define timercmp(tvp, uvp, cmp) \
22 (((tvp)->tv_sec != (uvp)->tv_sec) ? \
23 ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
24 ((tvp)->tv_usec cmp (uvp)->tv_usec))
25#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
26#endif /* _TIMEVAL_DEFINED */
27 5
28#define ITIMER_REAL 0 6#define ITIMER_REAL 0
29#define ITIMER_PROF 1 7#define ITIMER_PROF 1