See attached patch.
- Kirill Makurin
From 87951029ce19f763ebf28262bf0bb3a48fbed0c2 Mon Sep 17 00:00:00 2001
From: Kirill Makurin
Date: Sat, 8 Feb 2025 01:45:40 +0900
Subject: [PATCH] winpthreads: make sure WINPTHREAD_API is correctly defined in
pthread_time.h
When building with MSVC, pthread_ti
On 7.02.2025 10:22, Martin Storsjö wrote:
On Fri, 7 Feb 2025, LIU Hao wrote:
在 2025-02-06 22:23, Jacek Caban 写道:
FWIW, that's the approach we take in Wine for entire CRT modules
(not just static parts like mingw- w64-crt's counterpart), and it
works well. Most optimizations lost this way can
在 2025-02-07 16:58, Biswapriyo Nath 写道:
From d47f41050fbf562125fa1471ca1b88634006afa2 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath
Date: Fri, 7 Feb 2025 08:57:03 +
Subject: [PATCH] headers: Add new symbols in mapi.h
Fixeshttps://github.com/mingw-w64/mingw-w64/issues/75
Signed-off-by: Bis
This allows to remove the whole pre_c_init() function and registration of
pcinit hook.
---
mingw-w64-crt/crt/crtdll.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 797a8ab54e1d..6c6ea38f03f7 100644
Usage of separate static function __DllMainCRTStartup() is needed for MSVC
stack cookie handling as written in documentation for C Runtime Error R6035:
https://learn.microsoft.com/en-us/cpp/error-messages/tool-errors/c-runtime-error-r6035
mingw-w64 does not support MSVC stack cookie handling, it w
Function with name DllEntryPoint is entry point of the DLL library,
an alternative or aliased name to DllMainCRTStartup. So calling entry point
(DllEntryPoint) from entry point (DllMainCRTStartup) is just wrong.
Default DLL entry point function varies between compilers/linkers.
Borland C uses DllE
For DLL builds, move calling __main(), _pei386_runtime_relocator() and
__mingw_init_ehandler() functions from __DllMainCRTStartup() into
_CRT_INIT() function.
This allow applications with custom entry point, which would call
_CRT_INIT() manually, to work correctly.
Also _CRT_INIT() contains guard
This macro is always defined by _mingw.h and its value is not checked by
any header file. So remove usage of this macro in .c files and dead code of
code paths when not set.
---
mingw-w64-crt/crt/crtdll.c | 8
mingw-w64-crt/crt/crtexe.c | 4
2 files changed, 12 deletions(-)
diff --g
This will report runtime error if _CRT_INIT(DLL_PROCESS_DETACH) is called
by the current thread from some atexit_table hook.
Without this guard the _CRT_INIT(DLL_PROCESS_DETACH) function stay in the
infinite loop.
Startup code from Visual C++ runtime is doing same thing.
---
mingw-w64-crt/crt/cr
This macro is only set but not used by any mingw-w64 file.
---
mingw-w64-crt/crt/binmode.c | 2 --
mingw-w64-crt/crt/crtexe.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/mingw-w64-crt/crt/binmode.c b/mingw-w64-crt/crt/binmode.c
index f0473b086a56..18b15d1baaf4 100644
--- a/mingw-w64-crt
---
mingw-w64-crt/crt/crtdll.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index b7f2d183312f..6028d0c776f0 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -78,6 +78,7 @@ WINBOOL
This macro is used only on few places in .c files, not in .h files.
So remove its usage and dead code.
---
mingw-w64-crt/crt/crtdll.c | 7 ---
mingw-w64-crt/crt/crtexe.c | 1 -
mingw-w64-crt/crt/dll_argv.c | 4
mingw-w64-crt/crt/dllargv.c | 4
mingw-w64-crt/crt/tlssup.c | 4 --
Function _initterm() is declared in corecrt_startup.h and DllMain() in process.h
---
mingw-w64-crt/crt/crtdll.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index 87ab29b14136..d63915ca30a3 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++
---
mingw-w64-crt/crt/natstart.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/crt/natstart.c b/mingw-w64-crt/crt/natstart.c
index 0afbaa801a9a..5008790e1eef 100644
--- a/mingw-w64-crt/crt/natstart.c
+++ b/mingw-w64-crt/crt/natstart.c
@@ -10,5 +10,5 @@
_PGL
---
mingw-w64-crt/crt/crtdll.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index eefe0e0715bd..b7f2d183312f 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
@@ -171,7 +171,7 @@ __DllMainCRTStart
The variable __native_startup_lock should be volatile. But currently its
type is "volatile void *", which means that the dereferenced pointer value
is volatile, not the variable itself. Currently the compiler is throwing a
warning when the variable is used by InterlockedCompareExchangePointer() or
This will report runtime error if _CRT_INIT(DLL_PROCESS_ATTACH) is called
two or more times.
Without this guard the _CRT_INIT(DLL_PROCESS_ATTACH) may be unexpectely
called multiple times which will break __proc_attached counter and then
also the DLL_PROCESS_DETACH code path.
Startup code from Vis
---
mingw-w64-crt/crt/crtdll.c | 2 +-
mingw-w64-crt/crt/crtexe.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/crt/crtdll.c b/mingw-w64-crt/crt/crtdll.c
index a8b95ec50d59..bf2399d27e57 100644
--- a/mingw-w64-crt/crt/crtdll.c
+++ b/mingw-w64-crt/crt/crtdll.c
On Fri, 7 Feb 2025, LIU Hao wrote:
在 2025-02-06 22:23, Jacek Caban 写道:
FWIW, that's the approach we take in Wine for entire CRT modules (not just
static parts like mingw- w64-crt's counterpart), and it works well. Most
optimizations lost this way can be addressed by writing efficient C code
f
From d47f41050fbf562125fa1471ca1b88634006afa2 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath
Date: Fri, 7 Feb 2025 08:57:03 +
Subject: [PATCH] headers: Add new symbols in mapi.h
Fixes https://github.com/mingw-w64/mingw-w64/issues/75
Signed-off-by: Biswapriyo Nath
---
mingw-w64-headers/inc
20 matches
Mail list logo