From: Victor Stinner Date: Tue, 11 Jan 2022 23:35:26 +0000 (+0100) Subject: bpo-46303: Fix fileutils.h compiler warnings (GH-30550) X-Git-Tag: v3.11.0a4~19 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08bc1bad11cad39f508bd662c9b28fcd9c995512;p=thirdparty%2FPython%2Fcpython.git bpo-46303: Fix fileutils.h compiler warnings (GH-30550) Add missing pycore_fileutils.h include in _tkinter.c and _testconsole.c. --- diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index aabf20b8d963..f4d2716fe302 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -22,9 +22,15 @@ Copyright (C) 1994 Steen Lumholt. */ #define PY_SSIZE_T_CLEAN +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif #include "Python.h" #include +#ifdef MS_WINDOWS +# include "pycore_fileutils.h" // _Py_stat() +#endif #ifdef MS_WINDOWS #include diff --git a/PC/_testconsole.c b/PC/_testconsole.c index db84f73c7744..a8308835d8f8 100644 --- a/PC/_testconsole.c +++ b/PC/_testconsole.c @@ -1,11 +1,15 @@ - /* Testing module for multi-phase initialization of extension modules (PEP 489) */ +#ifndef Py_BUILD_CORE_BUILTIN +# define Py_BUILD_CORE_MODULE 1 +#endif + #include "Python.h" #ifdef MS_WINDOWS +#include "pycore_fileutils.h" // _Py_get_osfhandle() #include "..\modules\_io\_iomodule.h" #define WIN32_LEAN_AND_MEAN