On Sunday 18 October 2026 20:28:33 LIU Hao wrote:
> 在 2026-10-18 19:00, Pali Rohár 写道:
> > So for me it looks like this _implementation_ and _documentation_ of
> > function is even worse. If the documentation is saying completely fake
> > information then for me it really looks like the function is totally
> > useless.
> > 
> >  From the function name and what it could do, for me the purpose of the
> > function looks like to be runtime detection if running on older or newer
> > windows, and allow application to correctly run on the older version by
> > calling the fallback path. The importance is that this function is
> > provided directly by the mingw-w64 (as inline) and not by MS.
> 
> `IsWindowsVersionOrGreater()` and others are also defined as inline
> functions in Microsoft SDK, so they match.

Yea, but current MS SDK does not support XP anymore...
So compatibility things are not very helpful from MS.

> 
> > So that is why I originally thought that it makes sense to fix the
> > function to be able to call it on any Windows system and to make it
> > correctly return TRUE/FALSE, so application can decide what to do.
> > Not to crash application at the startup.
> > 
> > Function IsWindowsVersionOrGreater() which should detect if application
> > is running on Windows Vista or higher, and per-documentation it requires
> > Windows Vista, such function is really useless. Because it cannot be
> > used for its purpose.
> > 
> > So, does it make sense to fix this function to be useful, so it does not
> > crash the application when called on older system? Or let it is is?
> 
> It should match Microsoft SDK. There's nothing wrong with version helper
> APIs; instead if the test should run on win9x, then it should not call these
> APIs.

With Kirill we talked about alternative solution. What do you think
about this?

-    if (!IsWindowsVistaOrGreater()) {
+    if (_winver < _WIN32_WINNT_VISTA) {

_winver is available for all mingw-w64 builds (crtdll, msvcrt*, ucrt)
for all platforms. And is working also on Win9x.


Anyway, from all other changes, is this the only problematic change?
Or are there also some others? (Because there was no discussion about
other changes from that list which I sent.)


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

Reply via email to