aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorEli Zaretskii2013-02-16 15:59:37 +0200
committerEli Zaretskii2013-02-16 15:59:37 +0200
commitcd91fb4b0ae2c05d72adb61bc47c232c2dad015a (patch)
tree76e23eb7e8d05d9a26e66fcb6c16b61e76b381bc /nt
parentf277993be3a50b375c670351cb4051c806edd97f (diff)
downloademacs-cd91fb4b0ae2c05d72adb61bc47c232c2dad015a.tar.gz
emacs-cd91fb4b0ae2c05d72adb61bc47c232c2dad015a.zip
Don't use __STDC__ on MS-Windows unless necessary (Bug #9066).
nt/inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC. src/w32term.c <input_signal_count>: Declare 'volatile' unconditionally.
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog5
-rw-r--r--nt/inc/ms-w32.h10
2 files changed, 14 insertions, 1 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 18911b90fac..81477e801d6 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,8 @@
12013-02-16 Eli Zaretskii <eliz@gnu.org>
2
3 * inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC.
4 (Bug#9066)
5
12013-02-13 Juanma Barranquero <lekktu@gmail.com> 62013-02-13 Juanma Barranquero <lekktu@gmail.com>
2 7
3 * config.nt: Sync with autogen/config.in. 8 * config.nt: Sync with autogen/config.in.
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index a74c74b4548..5c3caeb38c9 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -265,8 +265,11 @@ struct timespec
265extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict); 265extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
266extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict); 266extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
267 267
268#ifdef _MSC_VER
268/* This is hacky, but is necessary to avoid warnings about macro 269/* This is hacky, but is necessary to avoid warnings about macro
269 redefinitions using the SDK compilers. */ 270 redefinitions using the MSVC compilers, since, when __STDC__ is
271 undefined or zero, those compilers declare functions like fileno,
272 lseek, and chdir, for which we defined macros above. */
270#ifndef __STDC__ 273#ifndef __STDC__
271#define __STDC__ 1 274#define __STDC__ 1
272#define MUST_UNDEF__STDC__ 275#define MUST_UNDEF__STDC__
@@ -278,6 +281,11 @@ extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
278#undef __STDC__ 281#undef __STDC__
279#undef MUST_UNDEF__STDC__ 282#undef MUST_UNDEF__STDC__
280#endif 283#endif
284#else /* !_MSC_VER */
285#include <direct.h>
286#include <io.h>
287#include <stdio.h>
288#endif /* !_MSC_VER */
281 289
282/* Defines that we need that aren't in the standard signal.h. */ 290/* Defines that we need that aren't in the standard signal.h. */
283#define SIGHUP 1 /* Hang up */ 291#define SIGHUP 1 /* Hang up */