This should fix error when compiling C++ modules[1].
- Kirill Makurin
[1] https://github.com/mingw-w64/mingw-w64/issues/99
From c3d9c047a80ee40545388a0359f25fa3d1f4a95e Mon Sep 17 00:00:00 2001
From: Kirill Makurin
Date: Sun, 22 Jun 2025 04:01:04 +0900
Subject: [PATCH] winpthreads: fix compiling
On Saturday 21 June 2025 13:47:12 Martin Storsjö wrote:
> On Fri, 20 Jun 2025, Pali Rohár wrote:
>
> > On Thursday 19 June 2025 20:52:59 Martin Storsjö wrote:
> > > On Sun, 15 Jun 2025, Pali Rohár wrote:
> > >
> > > > Both msvcrt and UCRT ABI uses for off_t-based function without any
> > > > suf
msvcrt *stat32* functions do not work for time before year 1970.
Add similar underflow checks into mingw-w64 emulations.
---
mingw-w64-crt/stdio/_fstat32i64.c | 6 +++---
mingw-w64-crt/stdio/_stat32i64.c | 6 +++---
mingw-w64-crt/stdio/_wstat32i64.c | 6 +++---
3 files changed, 9 insertions(+), 9
All 64-bit CRT libraries except the msvcrt.dll provides native _fstat32,
_stat32 and _wstat32 functions. 64-bit system os msvcrt.dll is an exception
and does not contain these function. So implement mingw-w64 emulation of
these functions via the 64-bit variants of stat functions.
Reported issue: h
This will check that of those functions can be compiled, linked and at
runtime can be resolved from CRT DLL library.
---
mingw-w64-crt/Makefile.am | 5 +-
mingw-w64-crt/testcases/t__fstat_all.c | 100
mingw-w64-crt/testcases/t__stat_all.c | 100
Additional changes for "crt: Improve LFS 64-bit functions" series.
Should be applied on top of them.
Pali Rohár (3):
headers: Add missing __cdecl for fopen64() function
headers: Declare missing open64(), freopen64() and tmpfile64()
functions
crt: Add testcases for lfs functions
mingw-w
Setting the lib32_libscrnsavw_a_CFLAGS variable automatically turns off
usage of AM_CFLAGS variable for that target. As the AM_CFLAGS contains the
mingw-w64 CRT build flags, specify it manually in lib32_libscrnsavw_a_CFLAGS
variable. Do same for all architectures.
---
mingw-w64-crt/Makefile.am | 8
---
mingw-w64-crt/stdio/_lseeki64.c | 2 +-
mingw-w64-crt/stdio/fsetpos.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-crt/stdio/_lseeki64.c b/mingw-w64-crt/stdio/_lseeki64.c
index 2408a6cfb6eb..6ead4a98e182 100644
--- a/mingw-w64-crt/stdio/_lseeki64.c
+++ b/m
This patch series adds _fstat32, _stat32, _wstat32, _fstat32i64,
_stat32i64 and _wstat32i64 function emulation for 64-bit msvcrt.dll
builds as the msvcrt.dll is missing those functions. Last change adds a
compile time test which ensures that all _fstat*, _stat* and _wstat*
functions can be used in
AM_CFLAGS contains cflags required to build the mingw-w64 CRT source code.
They are not intended to compile applications (including those used in
mingw-w64 testsuite). Setting per-target _CFLAGS variable
overwrites the AM_CFLAGS. So for every testcase sets the custom
_CFLAGS variable. This ensures
All 64-bit CRT libraries except the msvcrt.dll provides native _fstat32i64,
_stat32i64 and _wstat32i64 functions. 64-bit system os msvcrt.dll is an
exception and does not contain these function.
mingw-w64 already contains emulation of these functions for pre-msvcrt40
32-bit builds. Extend this emu
---
mingw-w64-headers/crt/io.h| 1 +
mingw-w64-headers/crt/stdio.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/mingw-w64-headers/crt/io.h b/mingw-w64-headers/crt/io.h
index a6dc2f8a1bb2..ac049e7c5cde 100644
--- a/mingw-w64-headers/crt/io.h
+++ b/mingw-w64-headers/crt/io.h
@@ -353,6
This will check that of those functions can be compiled, linked and at
runtime can be resolved from CRT DLL library.
---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/testcases/t_lfs.c | 29 +
2 files changed, 30 insertions(+)
create mode 100644 mingw-w64-crt/t
---
mingw-w64-headers/crt/stdio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index 89ce689cceb3..1cd6edc7a102 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -569,7 +569,7 @@ in
On Fri, 20 Jun 2025, Pali Rohár wrote:
On Thursday 19 June 2025 20:52:59 Martin Storsjö wrote:
On Sun, 15 Jun 2025, Pali Rohár wrote:
Both msvcrt and UCRT ABI uses for off_t-based function without any suffix
in their name the 32-bit long off_t type for both 32-bit and 64-bit
architectures.
15 matches
Mail list logo