Function IsWindowsVistaOrGreater() provided by mingw-w64 header files is
not compatible with systems older than Windows 2000 and on these systems
the compiled binary crashes during the startup because of missing symbol
VerSetConditionMask in kernel32.dll. Therefore this function for checking
compatibility with older Windows versions is not very useful.
Replace it by the checking for Windows version against the _winver variable
which is available for all mingw-w64 builds and on all Windows versions.
This allows to properly skip this test via return value 77 on older Windows
versions, as it is expected from the test suite.
---
mingw-w64-crt/testcases/t_safe_flush.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/mingw-w64-crt/testcases/t_safe_flush.c
b/mingw-w64-crt/testcases/t_safe_flush.c
index 3e967f323725..fd45daa9244e 100644
--- a/mingw-w64-crt/testcases/t_safe_flush.c
+++ b/mingw-w64-crt/testcases/t_safe_flush.c
@@ -8,7 +8,6 @@
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include <versionhelpers.h>
/* mingw-w64 headers */
#include "libtest.h"
@@ -142,7 +141,7 @@ int parent_main(const char *argv0) {
int main(int argc, char *argv[]) {
mingw_test_init ();
- if (!IsWindowsVistaOrGreater()) {
+ if (_winver < _WIN32_WINNT_VISTA) {
/* This test requires at least Windows Vista (where
* CRITICAL_SECTIONs were made shutdown-aware)
*/
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public