Merge from emacs-24; up to 2013-01-03T02:37:57Z!rgm@gnu.org
[bpt/emacs.git] / nt / inc / sys / time.h
index 87ad9d3..f8fb022 100644 (file)
@@ -8,7 +8,6 @@
 
 /* The guards are for MinGW64, which defines these structs on its
    system headers which are included by ms-w32.h.  */
-#ifndef _W64
 /* 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
@@ -25,9 +24,9 @@ struct timeval
         ((tvp)->tv_usec cmp (uvp)->tv_usec))
 #define timerclear(tvp)  (tvp)->tv_sec = (tvp)->tv_usec = 0
 #endif /* _TIMEVAL_DEFINED */
-#endif /* _W64 */
 
 #ifndef _TIMEZONE_DEFINED
+#define _TIMEZONE_DEFINED
 struct timezone
 {
   int          tz_minuteswest; /* minutes west of Greenwich */
@@ -35,10 +34,15 @@ struct timezone
 };
 #endif
 
+
 /* This needs to be compatible with Posix signature, in order to pass
-   the configure test for the type of the second argument.  See
-   m4/gettimeofday.m4.  */
-int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+   the configure test for the type of the second argument; see
+   m4/gettimeofday.m4.  We use '__restrict' here, rather than
+   'restrict', for the benefit of the old nt/configure.bat build,
+   which does not force the use of -std= switch to GCC, and that
+   causes compilation errors with 'restrict', which is a C99
+   extension.  */
+int gettimeofday (struct timeval *__restrict, struct timezone *__restrict);
 
 #define ITIMER_REAL      0
 #define ITIMER_PROF      1