From 5673330e271b4b84f3e82fd0a93371d13e34a2bd Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 17 Jun 2021 18:52:11 +0530
Subject: [PATCH 037/N] build: build winconsoleio and _testconsole
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Co-authored-by: Алексей <alexey.pawlow@gmail.com>
Co-authored-by: Naveen M K <naveen521kk@gmail.com>
---
 Modules/Setup.bootstrap.in | 2 +-
 Modules/Setup.stdlib.in    | 1 +
 configure.ac               | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/Modules/Setup.bootstrap.in b/Modules/Setup.bootstrap.in
index 692abba..0b53035 100644
--- a/Modules/Setup.bootstrap.in
+++ b/Modules/Setup.bootstrap.in
@@ -17,7 +17,7 @@ _suggestions _suggestions.c
 _codecs _codecsmodule.c
 _collections _collectionsmodule.c
 errno errnomodule.c
-_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
+_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c _io/winconsoleio.c
 itertools itertoolsmodule.c
 _sre _sre/sre.c
 _sysconfig _sysconfig.c
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in
index cc7290d..2940470 100644
--- a/Modules/Setup.stdlib.in
+++ b/Modules/Setup.stdlib.in
@@ -182,6 +182,7 @@
 @MODULE__TESTSINGLEPHASE_TRUE@_testsinglephase _testsinglephase.c
 @MODULE__TESTEXTERNALINSPECTION_TRUE@_testexternalinspection _testexternalinspection.c
 @MODULE__CTYPES_TEST_TRUE@_ctypes_test _ctypes/_ctypes_test.c
+@MODULE__TESTCONSOLE_TRUE@_testconsole ../PC/_testconsole.c
 
 # Limited API template modules; must be built as shared modules.
 @MODULE_XXLIMITED_TRUE@xxlimited xxlimited.c
diff --git a/configure.ac b/configure.ac
index 320c8a8..9ea5541 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8221,6 +8221,7 @@ PY_STDLIB_MOD([_testsinglephase], [test "$TEST_MODULES" = yes], [test "$ac_cv_fu
 PY_STDLIB_MOD([_testexternalinspection], [test "$TEST_MODULES" = yes])
 PY_STDLIB_MOD([xxsubtype], [test "$TEST_MODULES" = yes])
 PY_STDLIB_MOD([_xxtestfuzz], [test "$TEST_MODULES" = yes])
+PY_STDLIB_MOD([_testconsole], [test "$TEST_MODULES" = yes -a "$MACHDEP" = "win32"])
 PY_STDLIB_MOD([_ctypes_test],
   [test "$TEST_MODULES" = yes], [test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes],
   [], [$LIBM])
