[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r111805: Don't use __STDC__ on MS-Win
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r111805: Don't use __STDC__ on MS-Windows unless necessary (Bug #9066). |
Date: |
Sat, 16 Feb 2013 15:59:37 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 111805
fixes bug: http://debbugs.gnu.org/9066
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-02-16 15:59:37 +0200
message:
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.
modified:
nt/ChangeLog
nt/inc/ms-w32.h
src/ChangeLog
src/w32term.c
=== modified file 'nt/ChangeLog'
--- a/nt/ChangeLog 2013-02-13 00:52:04 +0000
+++ b/nt/ChangeLog 2013-02-16 13:59:37 +0000
@@ -1,3 +1,8 @@
+2013-02-16 Eli Zaretskii <address@hidden>
+
+ * inc/ms-w32.h (__STDC__): Fiddle with value only for MSVC.
+ (Bug#9066)
+
2013-02-13 Juanma Barranquero <address@hidden>
* config.nt: Sync with autogen/config.in.
=== modified file 'nt/inc/ms-w32.h'
--- a/nt/inc/ms-w32.h 2013-02-12 03:52:04 +0000
+++ b/nt/inc/ms-w32.h 2013-02-16 13:59:37 +0000
@@ -265,8 +265,11 @@
extern struct tm *gmtime_r (time_t const * restrict, struct tm * restrict);
extern struct tm *localtime_r (time_t const * restrict, struct tm * restrict);
+#ifdef _MSC_VER
/* This is hacky, but is necessary to avoid warnings about macro
- redefinitions using the SDK compilers. */
+ redefinitions using the MSVC compilers, since, when __STDC__ is
+ undefined or zero, those compilers declare functions like fileno,
+ lseek, and chdir, for which we defined macros above. */
#ifndef __STDC__
#define __STDC__ 1
#define MUST_UNDEF__STDC__
@@ -278,6 +281,11 @@
#undef __STDC__
#undef MUST_UNDEF__STDC__
#endif
+#else /* !_MSC_VER */
+#include <direct.h>
+#include <io.h>
+#include <stdio.h>
+#endif /* !_MSC_VER */
/* Defines that we need that aren't in the standard signal.h. */
#define SIGHUP 1 /* Hang up */
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-02-16 11:08:49 +0000
+++ b/src/ChangeLog 2013-02-16 13:59:37 +0000
@@ -1,5 +1,8 @@
2013-02-16 Eli Zaretskii <address@hidden>
+ * w32term.c <input_signal_count>: Declare 'volatile'
+ unconditionally. (Bug#9066)
+
* w32.c (set_errno): Reset h_errno and don't set it to any other
value. Set errno instead.
(check_errno): Reset h_errno.
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2013-01-24 05:41:28 +0000
+++ b/src/w32term.c 2013-02-16 13:59:37 +0000
@@ -191,11 +191,7 @@
/* Incremented by w32_read_socket whenever it really tries to read
events. */
-#ifdef __STDC__
static int volatile input_signal_count;
-#else
-static int input_signal_count;
-#endif
#ifdef CYGWIN
int w32_message_fd = -1;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r111805: Don't use __STDC__ on MS-Windows unless necessary (Bug #9066).,
Eli Zaretskii <=