diff -rupN --no-dereference Python-3.10.9/Modules/Setup Python-3.10.9-new/Modules/Setup --- Python-3.10.9/Modules/Setup 2022-12-08 09:37:00.233024881 +0100 +++ Python-3.10.9-new/Modules/Setup 2022-12-08 09:37:01.200024902 +0100 @@ -117,6 +117,9 @@ _stat _stat.c # stat.h interface time -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal timemodule.c # -lm # time operations and variables _thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # low-level threading interface +# build-in modules for windows platform: +winreg ../PC/winreg.c + # access to ISO C locale support _locale -DPy_BUILD_CORE_BUILTIN _localemodule.c # -lintl diff -rupN --no-dereference Python-3.10.9/PC/winreg.c Python-3.10.9-new/PC/winreg.c --- Python-3.10.9/PC/winreg.c 2022-12-08 09:36:57.116024811 +0100 +++ Python-3.10.9-new/PC/winreg.c 2022-12-08 09:37:01.201024902 +0100 @@ -18,6 +18,25 @@ #include "structmember.h" // PyMemberDef #include <windows.h> +#ifndef SIZEOF_HKEY +/* used only here */ +#if defined(MS_WIN64) +# define SIZEOF_HKEY 8 +#elif defined(MS_WIN32) +# define SIZEOF_HKEY 4 +#else +# error "SIZEOF_HKEY is not defined" +#endif +#endif + +#ifndef REG_LEGAL_CHANGE_FILTER +#define REG_LEGAL_CHANGE_FILTER (\ + REG_NOTIFY_CHANGE_NAME |\ + REG_NOTIFY_CHANGE_ATTRIBUTES |\ + REG_NOTIFY_CHANGE_LAST_SET |\ + REG_NOTIFY_CHANGE_SECURITY ) +#endif + static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); static BOOL clinic_HKEY_converter(PyObject *ob, void *p); static PyObject *PyHKEY_FromHKEY(HKEY h);