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

victor.stinner python-checkins at python.org
Wed Jan 4 10:59:53 EST 2017


https://hg.python.org/cpython/rev/5ea0fef6ec53
changeset:   105995:5ea0fef6ec53
branch:      2.7
parent:      105988:5988caffbff9
user:        Steve Dower <steve.dower at microsoft.com>
date:        Wed Dec 28 15:41:09 2016 -0800
summary:
  Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki Yamamoto

files:
  Misc/ACKS            |  3 ++-
  Misc/NEWS            |  6 ++++++
  Modules/_io/fileio.c |  3 +++
  Modules/main.c       |  3 +++
  4 files changed, 14 insertions(+), 1 deletions(-)


diff --git a/Misc/ACKS b/Misc/ACKS
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -1548,6 +1548,7 @@
 Florent Xicluna
 Alakshendra Yadav
 Hirokazu Yamamoto
+Masayuki Yamamoto
 Ka-Ping Yee
 Jason Yeo
 EungJun Yi
@@ -1574,4 +1575,4 @@
 Jelle Zijlstra
 Gennadiy Zlobin
 Peter Åstrand
-Dhushyanth Ramasamy
\ No newline at end of file
+Dhushyanth Ramasamy
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -42,6 +42,12 @@
 - Issue #28925: cPickle now correctly propagates errors when unpickle instances
   of old-style classes.
 
+Build
+-----
+
+- Issue #28768: Fix implicit declaration of function _setmode. Patch by
+  Masayuki Yamamoto
+
 
 What's New in Python 2.7.13
 ===========================
diff --git a/Modules/_io/fileio.c b/Modules/_io/fileio.c
--- a/Modules/_io/fileio.c
+++ b/Modules/_io/fileio.c
@@ -8,6 +8,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
@@ -10,6 +10,9 @@
 #endif
 
 #if defined(MS_WINDOWS) || defined(__CYGWIN__)
+#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