summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-07-28 07:50:36 -0700
committerGlenn Morris <rgm@gnu.org>2018-07-28 07:50:36 -0700
commit4713f5d7423f0a8f2a2dd147cec70982145562d6 (patch)
treeb052f21a286e65e2030119246b9ddf8fa8a716cf /nt
parent1bcf5d02da96784a04034b4c0aba8fdfa1413c4e (diff)
parentbd52f37cae3fbc25e576f9b0a1ba42596790965f (diff)
downloademacs-4713f5d7423f0a8f2a2dd147cec70982145562d6.tar.gz
Merge from origin/emacs-26
bd52f37 (origin/emacs-26) ; Fix last change: only MinGW runtime 5.0.2... 024d20f Fix compilation with mingw.org's MinGW 5.x headers 38b6748 Update the list of special forms in the ELisp manual 8579105 Don't fail to indent-sexp before a full sexp (Bug#31984) d24c5f2 Fix calls to modifications hooks in replace-buffer-contents 71a9151 * src/character.c (char_width): Support glyphs with faces. (... 0feb673 Display raw bytes as belonging to 'eight-bit' charset 2e2f00f ; * doc/emacs/mule.texi (International Chars): Fix last change. 00561b5 Fix inaccurate text in the user manual 5cfb7a3 Copyedits in tramp.texi, improved example with bash's readline 6f8f358 Minor Tramp doc update 2585fcb File Shadowing is not available on MS Windows 39da592 ; Minor markup change in indent.texi 2f00ffe ; bookmark-jump: Add comment about last change.
Diffstat (limited to 'nt')
-rw-r--r--nt/inc/ms-w32.h7
-rw-r--r--nt/inc/sys/socket.h5
2 files changed, 11 insertions, 1 deletions
diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h
index ff4317817e0..d15b6da1a74 100644
--- a/nt/inc/ms-w32.h
+++ b/nt/inc/ms-w32.h
@@ -455,7 +455,12 @@ extern char *get_emacs_configuration_options (void);
windows.h. For this to have proper effect, config.h must always be
included before windows.h. */
#define _WINSOCKAPI_ 1
-#define _WINSOCK_H
+#if !(defined __MINGW32_VERSION && __MINGW32_VERSION >= 5000002L)
+/* mingw.org's MinGW 5.x changed how it includes winsock.h and time.h,
+ and now defining _WINSOCK_H skips the definition of struct timeval,
+ which we don't want. */
+# define _WINSOCK_H
+#endif
/* Defines size_t and alloca (). */
#include <stdlib.h>
diff --git a/nt/inc/sys/socket.h b/nt/inc/sys/socket.h
index 2582cbdaef1..de282c467e6 100644
--- a/nt/inc/sys/socket.h
+++ b/nt/inc/sys/socket.h
@@ -49,6 +49,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#define timeval ws_timeval
#endif
+#if defined __MINGW32_VERSION && __MINGW32_VERSION >= 5000002L
+/* Need winerror.h before winsock2.h with mingw.org's MinGW 5.x,
+ otherwise some error codes are not defined. */
+# include <winerror.h>
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
/* process.c uses uint16_t (from C99) for IPv6, but