在 2026-10-7 16:39, Pali Rohár 写道:
From 39826b539afdfff28a0694c0892c9859cae9ef89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <[email protected]> Date: Sat, 25 Apr 2026 13:37:42 +0200 Subject: [PATCH 2/8] crt: test: Fix t_safe_flush.c test to not crash on older Windows versionsThis test is indirectly using the IsWindowsVersionOrGreater() function which does not work on older Windows versions on which are missing helper functions. Provide simple implementation via dynamic loading which allows to use IsWindowsVersionOrGreater() (and other functions which depends on it) with fallback to the implementation via GetVersion() for systems without the IsWindowsVersionOrGreater function symbol. --- mingw-w64-headers/include/versionhelpers.h | 23 ++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/mingw-w64-headers/include/versionhelpers.h b/mingw-w64-headers/include/versionhelpers.h index 35e4d917869d..b55d7471b759 100644 --- a/mingw-w64-headers/include/versionhelpers.h +++ b/mingw-w64-headers/include/versionhelpers.h @@ -19,8 +19,27 @@ VERSIONHELPERAPI IsWindowsVersionOrGreater(WORD major, WORD minor, WORD servpack)
Does this require a change in the API? You can check whether it's running on Vista in the test, for example, by checking whether kernel32.dll exports `AcquireSRWLockShared`.
-- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
