diff options
| author | Eli Zaretskii | 2013-03-28 22:51:26 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-03-28 22:51:26 +0200 |
| commit | 5d611e04506c5d34c823ea06fc4b27ff715a493e (patch) | |
| tree | 7ff31eb069b445f8bb880e1c1bc681bee73419bf | |
| parent | 97dababa47e5b2133f18f05f415dcf42c7066f84 (diff) | |
| download | emacs-5d611e04506c5d34c823ea06fc4b27ff715a493e.tar.gz emacs-5d611e04506c5d34c823ea06fc4b27ff715a493e.zip | |
Use 'restrict' in gettimeofday arguments, and make ms-w32.h compatible.
| -rw-r--r-- | nt/inc/ms-w32.h | 6 | ||||
| -rw-r--r-- | nt/inc/sys/time.h | 5 | ||||
| -rw-r--r-- | src/w32.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index cd183c917c4..6cbec2bdaaf 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h | |||
| @@ -99,8 +99,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 99 | #endif | 99 | #endif |
| 100 | 100 | ||
| 101 | #ifdef __GNUC__ | 101 | #ifdef __GNUC__ |
| 102 | # define restrict __restrict__ | 102 | /* config.h may have defined already. */ |
| 103 | # ifndef restrict | ||
| 104 | # define restrict __restrict__ | ||
| 105 | # endif | ||
| 103 | #else | 106 | #else |
| 107 | /* FIXME: should we define to __restrict, which MSVC supports? */ | ||
| 104 | # define restrict | 108 | # define restrict |
| 105 | #endif | 109 | #endif |
| 106 | 110 | ||
diff --git a/nt/inc/sys/time.h b/nt/inc/sys/time.h index 391898ef122..87ad9d3ff0d 100644 --- a/nt/inc/sys/time.h +++ b/nt/inc/sys/time.h | |||
| @@ -36,8 +36,9 @@ struct timezone | |||
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
| 38 | /* This needs to be compatible with Posix signature, in order to pass | 38 | /* This needs to be compatible with Posix signature, in order to pass |
| 39 | the configure test for the type of the second argument. */ | 39 | the configure test for the type of the second argument. See |
| 40 | int gettimeofday (struct timeval *, struct timezone *); | 40 | m4/gettimeofday.m4. */ |
| 41 | int gettimeofday (struct timeval *restrict, struct timezone *restrict); | ||
| 41 | 42 | ||
| 42 | #define ITIMER_REAL 0 | 43 | #define ITIMER_REAL 0 |
| 43 | #define ITIMER_PROF 1 | 44 | #define ITIMER_PROF 1 |
| @@ -2395,7 +2395,7 @@ get_emacs_configuration_options (void) | |||
| 2395 | 2395 | ||
| 2396 | /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ | 2396 | /* Emulate gettimeofday (Ulrich Leodolter, 1/11/95). */ |
| 2397 | int | 2397 | int |
| 2398 | gettimeofday (struct timeval *tv, struct timezone *tz) | 2398 | gettimeofday (struct timeval *restrict tv, struct timezone *restrict tz) |
| 2399 | { | 2399 | { |
| 2400 | struct _timeb tb; | 2400 | struct _timeb tb; |
| 2401 | _ftime (&tb); | 2401 | _ftime (&tb); |