]> granicus.if.org Git - python/commitdiff
Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto
authorSteve Dower <steve.dower@microsoft.com>
Wed, 28 Dec 2016 23:41:09 +0000 (15:41 -0800)
committerSteve Dower <steve.dower@microsoft.com>
Wed, 28 Dec 2016 23:41:09 +0000 (15:41 -0800)
Misc/NEWS
Modules/_io/fileio.c
Modules/main.c

index 8ce77785d0ac9e066286199b21b83c87efe7a2a8..9aebdb53b4a57d4947842ea19056c9b5c7fa4974 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,9 @@ Tests
 Build
 -----
 
+- Issue #28768: Fix implicit declaration of function _setmode. Patch by
+  Masayuki Yamamoto
+
 - Issue #29080: Removes hard dependency on hg.exe from PC/build.bat
 
 - Issue #23903: Added missed names to PC/python3.def.
index 54cfb7fa7d66b71f6d5f13e633331d73a37565b9..6854a44e2de2bf7c4531ea670b490a905db4c9ad 100644 (file)
@@ -9,6 +9,9 @@
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index d75f64a65f30580f76fb10df5a40b8be0200e19d..4cbe37697582544c34779aabc6d2919a72fcd853 100644 (file)
@@ -7,6 +7,9 @@
 
 #if defined(MS_WINDOWS) || defined(__CYGWIN__)
 #include <windows.h>
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif