emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112800: Fix compile errors in nt/inc


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112800: Fix compile errors in nt/inc/sys/time.h when using nt/configure.bat.
Date: Fri, 31 May 2013 11:47:18 +0300
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112800
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-05-31 11:47:18 +0300
message:
  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.
modified:
  nt/ChangeLog
  nt/inc/sys/time.h
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog      2013-05-29 16:48:42 +0000
+++ b/nt/ChangeLog      2013-05-31 08:47:18 +0000
@@ -1,3 +1,11 @@
+2013-05-31  Eli Zaretskii  <address@hidden>
+
+       * 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  <address@hidden>
 
        * Makefile.in (emacs.res): Include srcdir when preprocessing

=== modified file 'nt/inc/sys/time.h'
--- a/nt/inc/sys/time.h 2013-03-28 20:51:26 +0000
+++ b/nt/inc/sys/time.h 2013-05-31 08:47:18 +0000
@@ -35,10 +35,15 @@
 };
 #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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]