[Mingw-w64-public] [PATCH] headers: Import httprequest.idl from wine

2025-05-08 Thread Biswapriyo Nath
From 1cb6f2db5d1575ca74eccff329bab05158736bb4 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Fri, 9 May 2025 06:02:17 + Subject: [PATCH] headers: Import httprequest.idl from wine Signed-off-by: Biswapriyo Nath --- mingw-w64-crt/libsrc/uuid.c | 1 + mingw-w64-headers/Makefile.am

Re: [Mingw-w64-public] [PATCH] Always correctly #define NULL __null if available, like stddef.h

2025-05-08 Thread LIU Hao
在 2025-5-4 22:24, наб 写道: Consider the following program, reduced from Lensfun: #include extern char *f(const char *first_element, ...) __attribute__((__sentinel__)); static auto N = f("a", "b", NULL); static auto n = f("a", "b", nullptr); static auto z = f("a", "b", 0); #defin

Re: [Mingw-w64-public] [V2] winpthreads: add support for _USE_32BIT_TIME_T and _TIME_BITS macros

2025-05-08 Thread Kirill Makurin
Please ignore this message. I sent it a few days ago and apparently it got delivered only now. - Kirill Makurin From: Kirill Makurin Sent: Sunday, May 4, 2025 6:52 PM To: mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] [V2] winpthreads: a

[Mingw-w64-public] [PATCH] Always correctly #define NULL __null if available, like stddef.h

2025-05-08 Thread наб
Consider the following program, reduced from Lensfun: #include extern char *f(const char *first_element, ...) __attribute__((__sentinel__)); static auto N = f("a", "b", NULL); static auto n = f("a", "b", nullptr); static auto z = f("a", "b", 0); #define NULL 123 in C++11 and later, NUL

[Mingw-w64-public] [request] add httprequest.idl from Wine

2025-05-08 Thread Luau Project
Hi, *Note*: I'm making this request because I was not able to find it on the mailing lists, and I didn't find the file in the sources. I would like to request that the file httprequest.idl from Wine ( https://gitlab.winehq.org/wine/wine/-/blob/master/include/httprequest.idl ) to be added to

Re: [Mingw-w64-public] [V2] winpthreads: add support for _USE_32BIT_TIME_T and _TIME_BITS macros

2025-05-08 Thread Kirill Makurin
Hi, Can I ask for first 10 patches in this series to be reviewed? They mostly introduce changes to the build system (e.g. fixing `make dist`) or remove unused things (e.g. configure checks and no longer used code). Only the last patch adds support for `_USE_32BIT_TIME_T` and `_TIME_BITS`, whic

[Mingw-w64-public] [PATCH 7/7] crt: dirname: Use __mingw_filename_cp

2025-05-08 Thread Lasse Collin
This way it works even if setlocale(LC_ALL, ".UTF8") has been used with UCRT. IsDBCSLeadByteEx(CP_UTF8, x) always returns FALSE, so nothing else in dirname.c needs to be modified. --- mingw-w64-crt/misc/dirname.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mingw-w64-crt/m

Re: [Mingw-w64-public] [PATCH 5/7] crt: Add __mingw_filename_cp()

2025-05-08 Thread LIU Hao
在 2025-5-8 21:46, Pali Rohár 写道: Just a minor question: It is OK to have this function visible in public header file for applications? Should not be this function just internal for mingw-w64 build? As long as its name is reserved, that's fine. A public declaration also enables it to be used in

[Mingw-w64-public] [PATCH] winpthreads: Replace K&R declarations with ISO ones

2025-05-08 Thread LIU Hao
diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c index 77bb1fea3..fe2ae36f8 100644 --- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c +++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c @@ -131,9 +131,7 @@

Re: [Mingw-w64-public] [V2] winpthreads: add support for _USE_32BIT_TIME_T and _TIME_BITS macros

2025-05-08 Thread LIU Hao
在 2025-4-22 16:16, Kirill Makurin 写道: This is the updated patch series. Some patches have been reordered and new patches have been added. Some patches have been updated. I think this series of patches are safe for now. Applied and pushed to master. Thanks for the work. -- Best regards, LIU

Re: [Mingw-w64-public] [PATCH 5/7] crt: Add __mingw_filename_cp()

2025-05-08 Thread Pali Rohár
On Thursday 08 May 2025 16:40:46 Lasse Collin wrote: > It returns the code page that the CRT currently uses for filenames. > With UCRT, setlocale(LC_ALL, ".UTF-8") makes the CRT use UTF-8 > for filenames, ignoring CP_ACP and CP_OEMCP. Such a setlocale() call > can make the WinAPI filename code page

[Mingw-w64-public] [PATCH 1/7] crt: stat: Move internal function declarations to stdio/__mingw_fix_stat.h

2025-05-08 Thread Lasse Collin
--- mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/stdio/__mingw_fix_stat.h| 13 + mingw-w64-crt/stdio/__mingw_fix_stat_path.c | 2 +- mingw-w64-crt/stdio/__mingw_fix_wstat_path.c | 2 +- mingw-w64-crt/stdio/msvcr110plus_stat32.c | 3 +-- mingw-w6

[Mingw-w64-public] [PATCH 5/7] crt: Add __mingw_filename_cp()

2025-05-08 Thread Lasse Collin
It returns the code page that the CRT currently uses for filenames. With UCRT, setlocale(LC_ALL, ".UTF-8") makes the CRT use UTF-8 for filenames, ignoring CP_ACP and CP_OEMCP. Such a setlocale() call can make the WinAPI filename code page differ from the code page used by the CRT. Otherwise the CR

[Mingw-w64-public] [PATCH 2/7] crt: __mingw_fix_stat_path: Use size_t instead of int

2025-05-08 Thread Lasse Collin
strlen and wcslen return size_t. --- mingw-w64-crt/stdio/__mingw_fix_stat_path.c | 2 +- mingw-w64-crt/stdio/__mingw_fix_wstat_path.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-crt/stdio/__mingw_fix_stat_path.c b/mingw-w64-crt/stdio/__mingw_fix_stat_path.c i

[Mingw-w64-public] [PATCH 3/7] crt: stat: Check for malloc failure

2025-05-08 Thread Lasse Collin
__mingw_fix_stat_path() also returns NULL if the given path is NULL. In this case the _statXX function is still called so that it can set errno = EINVAL or call invalid parameter handler. --- mingw-w64-crt/stdio/__mingw_fix_stat_path.c | 2 ++ mingw-w64-crt/stdio/__mingw_fix_wstat_path.c | 2 ++

[Mingw-w64-public] [PATCH 6/7] crt: stat: Don't remove a trailing '\' if it is a DBCS trail byte

2025-05-08 Thread Lasse Collin
In double-byte character sets, the trail byte of a two-byte character can be a backslash. If such a two-byte character was at the end of the pathname, the trailing backslash was incorrectly removed. The code still removes only one trailing directory separator and thus stat("directory//", &st) stil

[Mingw-w64-public] [PATCH 4/7] crt: stat: Fail if the pathname ends with a slash and isn't a directory

2025-05-08 Thread Lasse Collin
POSIX requires stat("foo/", &st) to fail if "foo" isn't a directory or a symbolic link to a directory. See ENOTDIR in [1]. The statXX functions, that are used with MSVCRT, already have code to remove a trailing slash. Extend it to reject non-directories with ENOTDIR if a trailing slash was removed