From: Eli Zaretskii Date: Fri, 31 May 2013 08:47:18 +0000 (+0300) Subject: Fix compile errors in nt/inc/sys/time.h when using nt/configure.bat. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~113 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a157a5d3351cc9f017d2255f9992ce07cfc0fcf;p=emacs.git Fix compile errors in nt/inc/sys/time.h when using nt/configure.bat. nt/inc/sys/time.h (gettimeofday): Use '__restrict' instead of 'restrict', which is a C99 extension. See http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html and the following discussion for the problem this caused in the old nt/configure.bat build. --- diff --git a/nt/ChangeLog b/nt/ChangeLog index 781dfbb7c3f..c9fe372a4a2 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,11 @@ +2013-05-31 Eli Zaretskii + + * inc/sys/time.h (gettimeofday): Use '__restrict' instead of + 'restrict', which is a C99 extension. See + http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html + and the following discussion for the problem this caused in the + old nt/configure.bat build. + 2013-05-29 Eli Zaretskii * Makefile.in (emacs.res): Include srcdir when preprocessing diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index 87ad9d3ff0d..e586aaee07e 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h @@ -35,10 +35,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