diff options
| author | Eli Zaretskii | 2013-05-31 11:47:18 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-05-31 11:47:18 +0300 |
| commit | 2a157a5d3351cc9f017d2255f9992ce07cfc0fcf (patch) | |
| tree | 534f464867ad2a17f38179fb040d544b7f81f2bd | |
| parent | e26aac1f938d517a0c5826ac89e7be3649f02b1b (diff) | |
| download | emacs-2a157a5d3351cc9f017d2255f9992ce07cfc0fcf.tar.gz emacs-2a157a5d3351cc9f017d2255f9992ce07cfc0fcf.zip | |
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.
| -rw-r--r-- | nt/ChangeLog | 8 | ||||
| -rw-r--r-- | nt/inc/sys/time.h | 11 |
2 files changed, 16 insertions, 3 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 781dfbb7c3f..c9fe372a4a2 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-05-31 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * inc/sys/time.h (gettimeofday): Use '__restrict' instead of | ||
| 4 | 'restrict', which is a C99 extension. See | ||
| 5 | http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html | ||
| 6 | and the following discussion for the problem this caused in the | ||
| 7 | old nt/configure.bat build. | ||
| 8 | |||
| 1 | 2013-05-29 Eli Zaretskii <eliz@gnu.org> | 9 | 2013-05-29 Eli Zaretskii <eliz@gnu.org> |
| 2 | 10 | ||
| 3 | * Makefile.in (emacs.res): Include srcdir when preprocessing | 11 | * 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 | |||
| 35 | }; | 35 | }; |
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | |||
| 38 | /* This needs to be compatible with Posix signature, in order to pass | 39 | /* This needs to be compatible with Posix signature, in order to pass |
| 39 | the configure test for the type of the second argument. See | 40 | the configure test for the type of the second argument; see |
| 40 | m4/gettimeofday.m4. */ | 41 | m4/gettimeofday.m4. We use '__restrict' here, rather than |
| 41 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | 42 | 'restrict', for the benefit of the old nt/configure.bat build, |
| 43 | which does not force the use of -std= switch to GCC, and that | ||
| 44 | causes compilation errors with 'restrict', which is a C99 | ||
| 45 | extension. */ | ||
| 46 | int gettimeofday (struct timeval *__restrict, struct timezone *__restrict); | ||
| 42 | 47 | ||
| 43 | #define ITIMER_REAL 0 | 48 | #define ITIMER_REAL 0 |
| 44 | #define ITIMER_PROF 1 | 49 | #define ITIMER_PROF 1 |