On Fri, 28 Aug 2026, LIU Hao wrote:

Rebased onto current master.


From 9dff64a5101937c377575a5de7b446ef32f6b206 Mon Sep 17 00:00:00 2001
From: LIU Hao <[email protected]>
Date: Sat, 1 Aug 2026 19:05:07 +0800
Subject: [PATCH] headers/stralign{,_s}: Fix implementations of
`ua_wcs{cpy_s,chr,rchr}`

Old code checked for `_WConst_Return` which is never defined; it is
`_WConst_return` that is defined in corecrt.h, so these definitions were
never compiled.

And these definitions turn out to be incorrect: `ua_wcscpy_s` references
non-existent parameters, and `ua_wcschr` calls `wcscpy`. These have to be
re-implemented.

It's worth noting that Microsoft stralign.h has also been having these typos
since more than twenty years ago.

Signed-off-by: LIU Hao <[email protected]>
---
mingw-w64-headers/include/stralign.h | 20 ++++++++++++--------
1 file changed, 12 insertions(+), 8 deletions(-)

Looks ok, on a quick browse.

// Martin



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to