crt: Document all 32-bit x86 kernel32.dll symbols

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

Signed-off-by: Martin Storsjö <martin@martin.st>
1 file changed