mirror of
https://github.com/aphrody-labs/MINGW-packages.git
synced 2026-10-17 12:45:21 +00:00
107 lines
3.3 KiB
Diff
107 lines
3.3 KiB
Diff
From 5cb18e608d92385eb896863694a813bd09a53d91 Mon Sep 17 00:00:00 2001
|
|
From: Naveen M K <naveen521kk@gmail.com>
|
|
Date: Tue, 14 Feb 2023 20:40:42 +0530
|
|
Subject: [PATCH 018/N] build: enable winreg, msvcrt, _winapi, winsound and
|
|
_overlapped modules
|
|
|
|
---
|
|
Modules/Setup.bootstrap.in | 5 +++++
|
|
Modules/Setup.stdlib.in | 6 ++++++
|
|
Modules/_winapi.c | 2 ++
|
|
PC/msvcrtmodule.c | 2 ++
|
|
Python/dynamic_annotations.c | 2 +-
|
|
configure.ac | 9 +++++++++
|
|
6 files changed, 25 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/Modules/Setup.bootstrap.in b/Modules/Setup.bootstrap.in
|
|
index 0a932d4..ff066b0 100644
|
|
--- a/Modules/Setup.bootstrap.in
|
|
+++ b/Modules/Setup.bootstrap.in
|
|
@@ -40,3 +40,8 @@ _symtable symtablemodule.c
|
|
|
|
# for systems without $HOME env, used by site._getuserbase()
|
|
@MODULE_PWD_TRUE@pwd pwdmodule.c
|
|
+
|
|
+# build-in modules for windows platform:
|
|
+@MODULE_WINREG_TRUE@winreg ../PC/winreg.c
|
|
+@MODULE_MSVCRT_TRUE@msvcrt -DPy_BUILD_CORE ../PC/msvcrtmodule.c
|
|
+@MODULE__WINAPI_TRUE@_winapi _winapi.c
|
|
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in
|
|
index 8495235..7565e35 100644
|
|
--- a/Modules/Setup.stdlib.in
|
|
+++ b/Modules/Setup.stdlib.in
|
|
@@ -167,6 +167,12 @@
|
|
# _scproxy needs SystemConfiguration and CoreFoundation framework
|
|
@MODULE__SCPROXY_TRUE@_scproxy _scproxy.c
|
|
|
|
+############################################################################
|
|
+# Windows specific modules
|
|
+
|
|
+@MODULE__OVERLAPPED_TRUE@_overlapped overlapped.c
|
|
+@MODULE_WINSOUND_TRUE@winsound ../PC/winsound.c
|
|
+
|
|
|
|
############################################################################
|
|
# Test modules
|
|
diff --git a/Modules/_winapi.c b/Modules/_winapi.c
|
|
index 767a5b3..abfd32d 100644
|
|
--- a/Modules/_winapi.c
|
|
+++ b/Modules/_winapi.c
|
|
@@ -46,7 +46,9 @@
|
|
#endif
|
|
#include <windows.h>
|
|
#include <winioctl.h>
|
|
+#if defined(Py_DEBUG)
|
|
#include <crtdbg.h>
|
|
+#endif
|
|
#include "winreparse.h"
|
|
|
|
#if defined(MS_WIN32) && !defined(MS_WIN64)
|
|
diff --git a/PC/msvcrtmodule.c b/PC/msvcrtmodule.c
|
|
index b170e06..b4c3f92 100644
|
|
--- a/PC/msvcrtmodule.c
|
|
+++ b/PC/msvcrtmodule.c
|
|
@@ -22,7 +22,9 @@
|
|
#include <io.h>
|
|
#include <conio.h>
|
|
#include <sys/locking.h>
|
|
+#ifdef _DEBUG
|
|
#include <crtdbg.h>
|
|
+#endif
|
|
#include <windows.h>
|
|
|
|
#ifdef _MSC_VER
|
|
diff --git a/Python/dynamic_annotations.c b/Python/dynamic_annotations.c
|
|
index 7febaa0..70d5b3d 100644
|
|
--- a/Python/dynamic_annotations.c
|
|
+++ b/Python/dynamic_annotations.c
|
|
@@ -27,7 +27,7 @@
|
|
* Author: Kostya Serebryany
|
|
*/
|
|
|
|
-#ifdef _MSC_VER
|
|
+#ifdef MS_WINDOWS
|
|
# include <windows.h>
|
|
#endif
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 378cadf..c1fd201 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -8644,6 +8644,15 @@ PY_STDLIB_MOD([_ssl], [], [test "$ac_cv_working_openssl_ssl" = yes],
|
|
PY_STDLIB_MOD([_hashlib], [], [test "$ac_cv_working_openssl_hashlib" = yes],
|
|
[$OPENSSL_INCLUDES], [$OPENSSL_LDFLAGS $OPENSSL_LDFLAGS_RPATH $LIBCRYPTO_LIBS])
|
|
|
|
+dnl windows specific modules
|
|
+PY_STDLIB_MOD([winreg], [test "$MACHDEP" = "win32"])
|
|
+PY_STDLIB_MOD([msvcrt], [test "$MACHDEP" = "win32"])
|
|
+PY_STDLIB_MOD([_winapi], [test "$MACHDEP" = "win32"])
|
|
+PY_STDLIB_MOD([winsound], [test "$MACHDEP" = "win32"], [], [],
|
|
+ [-lwinmm])
|
|
+PY_STDLIB_MOD([_overlapped], [test "$MACHDEP" = "win32"], [], [],
|
|
+ [-lws2_32])
|
|
+
|
|
dnl test modules
|
|
PY_STDLIB_MOD([_testcapi],
|
|
[test "$TEST_MODULES" = yes],
|