[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3241c84: Remove unneeded stuff from nt/inc/sys/time
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 3241c84: Remove unneeded stuff from nt/inc/sys/time.h |
Date: |
Mon, 15 May 2017 15:48:27 -0400 (EDT) |
branch: master
commit 3241c84fd8cfa1e02472e52e6aefe2fff0726b3d
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
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.
---
nt/inc/sys/time.h | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h
index de06c11..6f67e5d 100644
--- a/nt/inc/sys/time.h
+++ b/nt/inc/sys/time.h
@@ -1,29 +1,7 @@
#ifndef SYS_TIME_H_INCLUDED
#define SYS_TIME_H_INCLUDED
-/*
- * sys/time.h either doesn't exist on Windows, or doesn't necessarily
- * have the below stuff.
- */
-
-/* The guards are for MinGW64, which defines these structs on its
- system headers which are included by ms-w32.h. */
-/* Allow inclusion of sys/time.h and winsock2.h in any order. Needed
- for running the configure test, which is only relevant to MinGW. */
-#ifndef _TIMEVAL_DEFINED
-#define _TIMEVAL_DEFINED
-struct timeval
-{
- long tv_sec; /* seconds */
- long tv_usec; /* microseconds */
-};
-#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
-#define timercmp(tvp, uvp, cmp) \
- (((tvp)->tv_sec != (uvp)->tv_sec) ? \
- ((tvp)->tv_sec cmp (uvp)->tv_sec) : \
- ((tvp)->tv_usec cmp (uvp)->tv_usec))
-#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
-#endif /* _TIMEVAL_DEFINED */
+#include_next <sys/time.h>
#define ITIMER_REAL 0
#define ITIMER_PROF 1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3241c84: Remove unneeded stuff from nt/inc/sys/time.h,
Eli Zaretskii <=