On 7/16/19 8:52 AM, Martin Storsjö wrote:
On Mon, 15 Jul 2019, Gravis wrote:
So apparently, two years ago, someone decided to break all Windows
2K/NT4 applications that use MB_CUR_MAX. See also:
https://sourceforge.net/p/mingw-w64/mailman/message/36107291/
As reasoned in the mail you quoted, it was my (and certainly others'
as well) understanding that mingw-w64 generally requires at least XP,
and that it is ok to assume XP, anywhere in the mingw-w64 code.
And the fact that it took two years for someone to notice suggests that
the assumption is mostly right.
What I don't understand is why there isn't a simple "#if WINVER >=
0x0501" so that applications that are specifically built to run on
older systems can still run.
Why? Because it was everybody's expectation that we only needed to
support XP.
Now, as noted on irc, these symbols are used in parts of lubmingwex,
which is independent of version defines used in the calling code, and
also is supposed to work with both msvcrt and ucrt, so an #if in the
header would probably be brittle.
But it should be doable to wrap this function in the x86_32 import
library, keeping the interface towards the crt import libraries
uniform. I'll send a patch for this.
But the main question I see is, what's the project's policy wrt
supporting older OS versions than the minimum (currently XP, but there
have been discussions about raising it to Vista):
1) Require new code to be tested to still work with any older OS
(essentially removing the minimum version concept altogether)
2) Disallow any workarounds for older versions
3) Allow reasonably non-intrusive workarounds, for things reported on
the mailing list, but don't require people to test on versions prior
to the minimum one (i.e. it can occasionally break and it's up to the
users of said older versions to test and report)
I think that the current 'status quo' solution is something like 3). I
don't consider win2k as supported version (and at some point XP will be
in similar position). In this case, Martin's patch fixing the problem is
small and straightforward, so getting it committed sounds good.
That said, Gravis, your use case is extremely rare and expecting us to
treat it with the same amount of care as we do for recent Windows
version is unrealistic. If you use 20 years old OS, you may just as well
use older version of mingw-w64. Another solution would be to start using
msvcr90.dll (which is redistributable for win2k), which will probably
work better in future mingw-w64 versions.
Jacek
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public