[Mingw-w64-public] [PATCH] gendef: Recognize PE binaries which do not have all Data Directories

2024-11-29 Thread Pali Rohár
PE format allows to have variable length of Data Directories in PE Optional Header. The exact number of Data Directories is stored in NumberOfRvaAndSizes field. Size of the optional header depends on the number of Data Directories. Constants IMAGE_SIZEOF_NT_OPTIONAL32_HEADER and IMAGE_SIZEOF_NT_O

Re: [Mingw-w64-public] [PATCH 2/4] crt: Split mingw_vfwscanf.c into mingw_swformat.c, mingw_vfwscanf.c and mingw_vswscanf.c

2024-11-29 Thread Martin Storsjö
On Thu, 28 Nov 2024, Pali Rohár wrote: Yes, that's probably reasonable. Anyway, I think this aspect is fine, but it would be good to mention it in a commit message (the fact that it's not necessary but it is done to disambiguate the two variants of the struct). If I don't have other issues with

Re: [Mingw-w64-public] [PATCH 3/4] crt: Move vscanf-family functions from libmingwex.a to individual CRT import libraries

2024-11-29 Thread Martin Storsjö
On Fri, 29 Nov 2024, Martin Storsjö wrote: On Tue, 19 Nov 2024, Pali Rohár wrote: C99 vscanf-family functions are natively available since msvcr120. This change allows to use native UCRT and msvcr120 C99 vscanf-family functions. I think this commit message would require a much longer explan

Re: [Mingw-w64-public] [PATCH 2/2] crt: Deduplicate common vcruntime140*.def.in content into vcruntime140-common.def.in

2024-11-29 Thread Martin Storsjö
On Wed, 27 Nov 2024, Pali Rohár wrote: All 3 vcruntime140 def files (vcruntime140.def.in, vcruntime140d.def.in and vcruntime140_app.def.in) contains exactly same symbols. Deduplicate symbols into new common file vcruntime140-common.def.in and include it in all 3 def files. --- ...e140.def.in =>

Re: [Mingw-w64-public] [PATCH] headers: Improve _STATIC_ASSERT for modern compilers

2024-11-29 Thread Martin Storsjö
On Wed, 27 Nov 2024, Pali Rohár wrote: C11 supports two-arg _Static_assert keyword C++11 supports two-arg static_assert keyword C++17 supports one-arg static_assert keyword C23 supports one-arg static_assert keyword So when possible expand _STATIC_ASSERT macro to the suitable C/C++ keyword. ---

Re: [Mingw-w64-public] [PATCH 3/4] crt: Move vscanf-family functions from libmingwex.a to individual CRT import libraries

2024-11-29 Thread Pali Rohár
On Saturday 30 November 2024 00:46:09 Martin Storsjö wrote: > On Fri, 29 Nov 2024, Martin Storsjö wrote: > > > On Tue, 19 Nov 2024, Pali Rohár wrote: > > > > > C99 vscanf-family functions are natively available since msvcr120. > > > > > > This change allows to use native UCRT and msvcr120 C99 vs

Re: [Mingw-w64-public] [PATCH] headers: Improve _STATIC_ASSERT for modern compilers

2024-11-29 Thread LIU Hao
在 2024-11-30 07:00, Pali Rohár 写道: Yes, usage of those macros are for applications. VC++ header files also contain this _STATIC_ASSERT macro and I saw it used in some applications. This macro is useful when writing pre-C11/C++11 code. Or when writing C11 code without C23 compiler support and wan

Re: [Mingw-w64-public] [PATCH] headers: Improve _STATIC_ASSERT for modern compilers

2024-11-29 Thread Pali Rohár
On Saturday 30 November 2024 00:53:08 Martin Storsjö wrote: > On Wed, 27 Nov 2024, Pali Rohár wrote: > > > C11 supports two-arg _Static_assert keyword > > C++11 supports two-arg static_assert keyword > > C++17 supports one-arg static_assert keyword > > C23 supports one-arg static_assert keyword >