On Thursday 31 July 2025 16:29:08 Martin Storsjö wrote:
> On Sun, 27 Jul 2025, Pali Rohár wrote:
> 
> > Reorder symbols in mingw-w64-crt/lib32/kernel32.def file and document in
> > which Windows version was each symbol introduced.
> > 
> > Symbols are now grouped by Windows version, starting from the oldest
> > Windows version and the newest is at the end of file. It covers all 32-bit
> > x86 kernel32.dll versions in Win32s releases, Windows 9x releases and
> > Windows NT releases starting from the first Windows NT 3.1 up to the last
> > released Windows 11 2024 Update (Hudson Valley / 24H2). In future new
> > symbols from new Windows releases should be added into new section at the
> > end of def file.
> > 
> > This grouping can be very useful to check if the particular Windows version
> > already has symbol X or in which version was symbol X introduced, to ensure
> > that produced PE binary can be loaded on specified Windows version or not.
> > 
> > This is just documentation change and does not add or remove any symbol in
> > 32-bit x86 libkernel32.a import library.
> > 
> > Newly documented symbols which were missing in the def file were added as
> > comments. Symbols which are not available in any Windows versions were
> > moved to the end of file and are there as is. In future changes missing
> > symbols could be enabled or non-existent symbols could be removed.
> > 
> > The fact that this does not change list of symbols can be verified by
> > comparing lines of kernel32.def file before and after this change that are
> > same when trimming comments and skipping empty lines. E.g. by command:
> > 
> >    sed 's/\s*;.*//;/^$/d' mingw-w64-crt/lib32/kernel32.def | LC_ALL=C sort
> > ---
> > mingw-w64-crt/lib32/kernel32.def | 3004 ++++++++++++++++++------------
> > 1 file changed, 1770 insertions(+), 1234 deletions(-)
> 
> This change LGTM. Thanks, this is useful documentation! Will push after some
> CI.
> 
> // Martin

Here is small fixup for this change, it just updates typos and missing info in 
comments:

diff --git a/mingw-w64-crt/lib32/kernel32.def b/mingw-w64-crt/lib32/kernel32.def
index 5e7709c5b24e..f0d3e27520ce 100644
--- a/mingw-w64-crt/lib32/kernel32.def
+++ b/mingw-w64-crt/lib32/kernel32.def
@@ -4,7 +4,7 @@ EXPORTS
 ; This file is a comprehensive documentation for 32-bit x86 kernel32.dll 
symbols.
 ; It covers all 3 platforms Win32s, Win9x and WinNT and contains information
 ; from native kernel32.dll libraries on 32-bit Windows systems and also from
-; 32-bit WOW64 kernel32.dll libraries on 64-bit Windows systems. Symbols in 
this
+; 32-bit WoW64 kernel32.dll libraries on 64-bit Windows systems. Symbols in 
this
 ; file are ordered by increasing Windows version in which they were introduced.
 ; For example symbols added in Windows 98 (which is version 4.10) are before
 ; Windows NT 4.0 symbols. Note that some symbols are available in Windows NT 
3.1,
@@ -519,8 +519,8 @@ UTUnRegister@4
 ; Note that Win32s 1.15 and all later versions merged advapi32.dll, gdi32.dll,
 ; kernel32.dll, ntdll.dll, user32.dll (and Win32s 1.25a and later also mpr.dll)
 ; libraries into one big w32scomb.dll library and made those libraries as alias
-; to w32scomb.dll, which effectively any symbol from any other that library is
-; available also from kernel32.dll (aliased ro w32scomb.dll). Below are only
+; to w32scomb.dll, which effectively means that every symbol from every library
+; is available also from kernel32.dll (aliased to w32scomb.dll). Below are only
 ; those Win32s symbols which are available in some Win9x or WinNT version of
 ; kernel32.dll or logically belongs to kernel32.dll.
 CompareStringA@24
@@ -1378,8 +1378,8 @@ Wow64EnableWow64FsRedirection@4
 ; This is list of symbols added in Windows Server 2003 SP1 and Windows XP x64 
SP1 (WoW64 version)
 AddVectoredContinueHandler@8
 BaseCheckRunApp@52 ; FIXME: Windows Server 2003 has ABI "BaseCheckRunApp@40", 
Windows Vista and 7 has ABI "BaseCheckRunApp@52", Windows 8 has ABI 
"BaseCheckRunApp@56", Windows 8.1 has ABI "BaseCheckRunApp@60" ; removed in 
Windows 10
-; BaseProcessStartThunk@0 ; available only in 32-bit WoW64 version on 64-bit 
system
-; BaseThreadStartThunk@0 ; available only in 32-bit WoW64 version on 64-bit 
system
+; BaseProcessStartThunk@0 ; available only in 32-bit WoW64 version on 64-bit 
system ; removed in Windows Vista
+; BaseThreadStartThunk@0 ; available only in 32-bit WoW64 version on 64-bit 
system ; removed in Windows Vista
 BasepCheckBadapp@56 ; FIXME: Windows Server 2003 has ABI 
"BasepCheckBadapp@36", Windows Vista has ABI "BasepCheckBadapp@56", Windows 7 
has ABI "BasepCheckBadapp@60", Windows 8 and Windows 8.1 has ABI 
"BasepCheckBadapp@72" ; removed in Windows 10
 BasepFreeAppCompatData@12 ; FIXME: Windows Server 2003 has ABI 
"BasepFreeAppCompatData@8", Windows Vista and new has ABI 
"BasepFreeAppCompatData@12"
 ConsoleIMERoutine@4 ; available only in 32-bit WoW64 version on 64-bit system



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

Reply via email to