summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5f2459c)
This changeset defines _WIN32_WINNT to at least 0x0501, the level
of Windows XP, unless defined to a higher level, in a single
place. It then removes all the overrides of _WIN32_WINNT in
individual files as no longer needed. Doing this also solves
compilation of windows-nat.c with mingw.org's MinGW, as that
file uses CONSOLE_FONT_INFO which needs the XP level to become
exposed in the Windows headers, while mingw.org defaults to
Windows 9X.
gdb/ChangeLog:
2019-05-03 Eli Zaretskii <eliz@gnu.org>
* common/common-defs.h [__MINGW32__ || __CYGWIN__]: Define
_WIN32_WINNT to the XP level, unless already defined to a higher
level.
* unittests/parse-connection-spec-selftests.c:
* ser-tcp.c:
* common/netstuff.c [USE_WIN32API]: Remove the _WIN32_WINNT
override.
gdb/gdbserver/ChangeLog:
2019-05-03 Eli Zaretskii <eliz@gnu.org>
* remote-utils.c:
* gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2019-05-03 Eli Zaretskii <eliz@gnu.org>
2019-05-03 Eli Zaretskii <eliz@gnu.org>
+ * common/common-defs.h [__MINGW32__ || __CYGWIN__]: Define
+ _WIN32_WINNT to the XP level, unless already defined to a higher
+ level.
+
+ * unittests/parse-connection-spec-selftests.c:
+ * ser-tcp.c:
+ * common/netstuff.c [USE_WIN32API]: Remove the _WIN32_WINNT
+ override.
+
* symfile.c (find_separate_debug_file): Remove colon from the
drive spec of DOS/Windows file names of the target, so that the
file name produced from DEBUGDIR and the target's directory will
* symfile.c (find_separate_debug_file): Remove colon from the
drive spec of DOS/Windows file names of the target, so that the
file name produced from DEBUGDIR and the target's directory will
#define _FORTIFY_SOURCE 2
#endif
#define _FORTIFY_SOURCE 2
#endif
+/* We don't support Windows versions before XP, so we define
+ _WIN32_WINNT correspondingly to ensure the Windows API headers
+ expose the required symbols. */
+#if defined (__MINGW32__) || defined (__CYGWIN__)
+# ifdef _WIN32_WINNT
+# if _WIN32_WINNT < 0x0501
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x0501
+# endif
+# else
+# define _WIN32_WINNT 0x0501
+# endif
+#endif /* __MINGW32__ || __CYGWIN__ */
+
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#ifdef USE_WIN32API
#include <algorithm>
#ifdef USE_WIN32API
-#if _WIN32_WINNT < 0x0501
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
-#endif
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
+2019-05-03 Eli Zaretskii <eliz@gnu.org>
+
+ * remote-utils.c:
+ * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
+
2019-04-19 Tom Tromey <tom@tromey.com>
* server.c (struct vstop_notif): Derive from notif_event.
2019-04-19 Tom Tromey <tom@tromey.com>
* server.c (struct vstop_notif): Derive from notif_event.
-#if _WIN32_WINNT < 0x0501
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
-#endif
#include <ws2tcpip.h>
#endif
#include <ws2tcpip.h>
#endif
#include <sys/stat.h>
#if USE_WIN32API
#include <sys/stat.h>
#if USE_WIN32API
-#if _WIN32_WINNT < 0x0501
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
-#endif
#include <ws2tcpip.h>
#endif
#include <ws2tcpip.h>
#endif
#include "common/gdb_sys_time.h"
#ifdef USE_WIN32API
#include "common/gdb_sys_time.h"
#ifdef USE_WIN32API
-#if _WIN32_WINNT < 0x0501
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
-#endif
#include <ws2tcpip.h>
#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#include <ws2tcpip.h>
#ifndef ETIMEDOUT
#define ETIMEDOUT WSAETIMEDOUT
#include "common/netstuff.h"
#include "diagnostics.h"
#ifdef USE_WIN32API
#include "common/netstuff.h"
#include "diagnostics.h"
#ifdef USE_WIN32API
-#if _WIN32_WINNT < 0x0501
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
-#endif
#include <ws2tcpip.h>
#else
#include <netinet/in.h>
#include <ws2tcpip.h>
#else
#include <netinet/in.h>