[Python-checkins] cpython (merge 3.6 -> default): Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki

steve.dower python-checkins at python.org
Wed Dec 28 18:42:01 EST 2016


https://hg.python.org/cpython/rev/276d1bae92be
changeset: 105879:276d1bae92be
parent: 105877:57c2fc60c989
parent: 105878:5027780d456b
user: Steve Dower <steve.dower at microsoft.com>
date: Wed Dec 28 15:41:53 2016 -0800
summary:
 Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto
files:
 Misc/NEWS | 3 +++
 Modules/_io/fileio.c | 3 +++
 Modules/main.c | 3 +++
 3 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -597,6 +597,9 @@
 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.
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -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
diff --git a/Modules/main.c b/Modules/main.c
--- a/Modules/main.c
+++ b/Modules/main.c
@@ -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
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /