On Thu, 24 Oct 2024, Pali Rohár wrote:
I took files which did not cause compile errors.
Right - what happens if you'd try to use this msvcrtd import library and try
to call one of those functions that you omitted then?
Before this change, application used GetModuleHandle on msvcrt.dll
(not msvcrtD.dll) and tried to resolve that called function. So if the
msvcrt.dll was loaded then there was a mix of msvcrt.dll and msvcrtd.dll
calls -- which is wrong.
With this change, linker throws a link error about undefined symbol.
Same behavior as tryign to link against msvcrt40.dll or msvcr70.dll
which do not provide that symbol neither.
Ah, right, so this is only for some of the conditionally available
functions that may exist in newer versions of msvcrt.dll. Then this
probably is reasonable.
We can extend mingw-w64 source of those function, so they can be
compiled also for msvcrt40, msvcr70, msvcrtd, ... if needed.
That's not a high priority for me right now, as the current status sounds
reasonble here.
Ok. If you like the attached diff in the previous email, please let me
know if it is needed something more with it for committing. Then I can
prepare a new version of msvcrtD based on that diff.
I think that diff looked reasonable, but please post it as a proper
standalone patch so others have better visibility about it too.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public