在 2025-6-24 19:55, Martin Storsjö 写道:
This fixes building in C++17 mode, with errors like:
../testcases/t_trycatch.cpp:3:18: error: ISO C++17 does not allow dynamic
exception specifications [-Wdynamic-exception-spec]
3 | void foo (int d) throw (int)
| ^~~
S
On Tue, 24 Jun 2025, Pali Rohár wrote:
The issues encountered by both the Clang and GCC builds are:
../testcases/t_ansi_io.c: In function 'main':
../testcases/t_ansi_io.c:11:10: fatal error: _mingw_print_push.h: No such
file or directory
11 | #include <_mingw_print_push.h>
(This header was
On Tuesday 24 June 2025 14:47:45 Martin Storsjö wrote:
> On Tue, 24 Jun 2025, Pali Rohár wrote:
>
> > On Tuesday 24 June 2025 14:41:10 Martin Storsjö wrote:
> > > On Tue, 24 Jun 2025, Martin Storsjö wrote:
> > >
> > > > On Sat, 21 Jun 2025, Pali Rohár wrote:
> > > >
> > > > > AM_CFLAGS contains
Modifier w for %s, %S, %c and %C is same as modifier l.
It is common that wchar_t* string is printed by %ws format by Windows
applications.
This change allows to use %ws by applications compiled by flag
-D__USE_MINGW_ANSI_STDIO=1, which is by default enabled for C99+ msvcrt.dll
builds.
Modifier w
---
mingw-w64-crt/Makefile.am | 6 ++
mingw-w64-crt/testcases/t_format_CS.c | 2 +
mingw-w64-crt/testcases/t_format_CS0.c | 2 +
mingw-w64-crt/testcases/t_format_CS1.c | 2 +
mingw-w64-crt/testcases/t_format_CS_tmpl.h | 118 +
5 files chang
---
mingw-w64-crt/Makefile.am | 6 ++
mingw-w64-crt/testcases/t_format_Z.c | 2 +
mingw-w64-crt/testcases/t_format_Z0.c | 2 +
mingw-w64-crt/testcases/t_format_Z1.c | 2 +
mingw-w64-crt/testcases/t_format_Z_tmpl.h | 108 ++
5 files changed,
Experiments showed that printf format %ws is supported in all CRT libraries
except:
- msvcrt20.dll (Visual C++ 2.0 - 2.2)
- msvcrt40.dll (Visual C++ 4.0 - 4.1)
- msvcr40d.dll (Visual C++ 4.0 - 4.1)
- mingw-w64 (__mingw_printf function)
Calling printf("%ws", ...) for above cases just prints "%ws".
Format %c and %s when used in some wide wprintf function takes the wide
wchar_t char or wide wchar_t* string. This is msvcrt.dll and UCRT behavior.
This change aligns the mingw-w64 wprintf functions to be compatible with MS.
---
mingw-w64-crt/stdio/mingw_pformat.c | 12 ++--
1 file change
Format %Z takes pointer to ANSI_STRING or UNICODE_STRING based on the
wideness of format.
In this mingw-w64 implementation (same as in UCRT) the uppercase format %Z
has the same default wideness as uppercase format %S when no h, l or w
modifier is specified.
Format %Z is supported by crtdll, msvc
---
mingw-w64-crt/testcases/t_snprintf.c | 1 +
mingw-w64-crt/testcases/t_snwprintf.c | 1 +
mingw-w64-crt/testcases/t_swprintf.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/mingw-w64-crt/testcases/t_snprintf.c
b/mingw-w64-crt/testcases/t_snprintf.c
index 373a9373c86d..1230fab4b4ef 10
__pformat_wputchars() for snprintf, __pformat_puchats() for swprintf and
__pformat_puchats() for snprintf prints all characters including nul chars.
So change __pformat_wputchars() for swprintf to align this behavior.
This change is needed for swprintf(%wZ) support in follow up change.
---
mingw-
Format %C and %S uses opposite wideness as format %c and %s.
So %S in printf uses wchar_t* string and in wprintf uses char* string.
Format %C and %S can be changed by l or h modifiers, like %c and %s.
So for example %hC uses char type in both printf and wprintf calls
and for example %lS uses wchar
On Tuesday 24 June 2025 17:19:19 Martin Storsjö wrote:
> On Mon, 23 Jun 2025, Pali Rohár wrote:
>
> > On Monday 23 June 2025 15:42:08 Martin Storsjö wrote:
> > > On Sat, 21 Jun 2025, Pali Rohár wrote:
> > >
> > > > Setting the lib32_libscrnsavw_a_CFLAGS variable automatically turns off
> > > > us
On Tuesday 24 June 2025 23:27:07 Martin Storsjö wrote:
> On Tue, 24 Jun 2025, Pali Rohár wrote:
>
> > On Tuesday 24 June 2025 17:13:01 Martin Storsjö wrote:
> > > On Tue, 24 Jun 2025, Martin Storsjö wrote:
> > >
> > > > On Tue, 24 Jun 2025, Pali Rohár wrote:
> > > >
> > > > > When I run tests ma
This header was removed in 70860d945e6be713af352ee62820bccb653589c2
in 2018.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/testcases/t_ansi_io.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/mingw-w64-crt/testcases/t_ansi_io.c
b/mingw-w64-crt/testcases/t_ansi_io.c
index dc3d0caf3..35f8
From: Pali Rohár
This fixes linking this test with UCRT.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/testcases/tstmain_sys_xxx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mingw-w64-crt/testcases/tstmain_sys_xxx.c
b/mingw-w64-crt/testcases/tstmain_sys_xxx.c
inde
On Tue, 24 Jun 2025, Pali Rohár wrote:
On Tuesday 24 June 2025 17:13:01 Martin Storsjö wrote:
On Tue, 24 Jun 2025, Martin Storsjö wrote:
On Tue, 24 Jun 2025, Pali Rohár wrote:
When I run tests manually at the time of sending those my changes, they
passed on 32-bit msvcrt locally.
FWIW, yo
On Tuesday 24 June 2025 14:32:21 Martin Storsjö wrote:
> On Sat, 21 Jun 2025, Pali Rohár wrote:
>
> > 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 _
On Tuesday 24 June 2025 17:13:01 Martin Storsjö wrote:
> On Tue, 24 Jun 2025, Martin Storsjö wrote:
>
> > On Tue, 24 Jun 2025, Pali Rohár wrote:
> >
> > > When I run tests manually at the time of sending those my changes, they
> > > passed on 32-bit msvcrt locally.
> >
> > FWIW, you probably hav
On Mon, 23 Jun 2025, Pali Rohár wrote:
On Monday 23 June 2025 15:42:08 Martin Storsjö wrote:
On Sat, 21 Jun 2025, Pali Rohár wrote:
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
On Tue, 24 Jun 2025, LIU Hao wrote:
在 2025-6-24 19:55, Martin Storsjö 写道:
This fixes building in C++17 mode, with errors like:
../testcases/t_trycatch.cpp:3:18: error: ISO C++17 does not allow dynamic
exception specifications [-Wdynamic-exception-spec]
3 | void foo (int d) throw (int)
On Tue, 24 Jun 2025, Martin Storsjö wrote:
On Tue, 24 Jun 2025, Pali Rohár wrote:
When I run tests manually at the time of sending those my changes, they
passed on 32-bit msvcrt locally.
FWIW, you probably have old headers lying around in your sysroot if you don't
notice the issue with the
This fixes a regression from
53a3686f0920f1dc2fba34691d8eb8094851d82e; at this point,
_Stat->st_mode is uninitialized in these functions.
Signed-off-by: Martin Storsjö
---
mingw-w64-crt/stdio/msvcr110pre_stat32.c | 2 +-
mingw-w64-crt/stdio/msvcr110pre_stat64i32.c | 2 +-
mingw-w64-crt/stdi
On Tue, 24 Jun 2025, Pali Rohár wrote:
When I run tests manually at the time of sending those my changes, they
passed on 32-bit msvcrt locally.
FWIW, you probably have old headers lying around in your sysroot if you
don't notice the issue with the missing _mingw_print_push.h header, which
ha
On Tuesday 24 June 2025 14:41:10 Martin Storsjö wrote:
> On Tue, 24 Jun 2025, Martin Storsjö wrote:
>
> > On Sat, 21 Jun 2025, Pali Rohár wrote:
> >
> > > AM_CFLAGS contains cflags required to build the mingw-w64 CRT source code.
> > > They are not intended to compile applications (including thos
This fixes building in C++17 mode, with errors like:
../testcases/t_trycatch.cpp:3:18: error: ISO C++17 does not allow dynamic
exception specifications [-Wdynamic-exception-spec]
3 | void foo (int d) throw (int)
| ^~~
Signed-off-by: Martin Storsjö
---
mingw-w
On Tue, 24 Jun 2025, Martin Storsjö wrote:
On Sat, 21 Jun 2025, Pali Rohár wrote:
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
overwrit
On Sat, 21 Jun 2025, Pali Rohár wrote:
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
On Mon, 23 Jun 2025, Pali Rohár wrote:
I was trying to do it via some foreach, but I have not figured out how.
The problem is that the Makefile.am is processed by GNU automake which
process those those _CFLAGS variables. And if the automake does
not see _CFLAGS then into target it puts $(AM_CFLA
29 matches
Mail list logo