On Monday 23 February 2026 11:44:41 Kirill Makurin wrote: > Martin Storsjö <[email protected]> wrote: > > On Fri, 20 Feb 2026, Kirill Makurin wrote: > > > >> When you configuring such a package with autoconf-like > >> checks, you'll run those tests against msvcrt.dll on the build system, > >> which is likely to be Windows 10/11, which has many functions not > >> available in ancient versions of msvcrt.dll. You'll build the project > >> and it'll run on the build system, but it may fail to load on old system > >> with older versions of msvcrt.dll. > > > > This is not true. > > > > When autoconf does a compile/link test, it links against the msvcrt import > > library in the form it is provided by mingw-w64. Whatever version of > > msvcrt.dll is available on the build system is entirely irrelevant; you > > may be cross compiling where there's no system msvcrt.dll at all. The only > > case it makes a difference is if the autoconf project is set up to do not > > just compile+link, but compile+link+execute tests, but that is rare. > > This is exactly what leads to the situation that I've described. > > mingw-w64's import library for msvcrt.dll exports symbols which are not > available in old versions of msvcrt.dll. Compile+link tests will succeed > regardless of system's msvcrt.dll, and the project will build without issues. > Then, for a native build, running project's testsuite on the build system > will likely show no issues - the system has recent enough msvcrt.dll. Later, > if the image is run on system with some older version of msvcrt.dll, it may > fail to load because it references a symbol that is not available in that > msvcrt.dll. > > - Kirill Makurin
I agree here. The compile/link test cannot detect whether the msvcrt symbol is present and also the compile/link/execute test in most cases would not uncover it as it would execute it on Windows 10/11 system. The point of those my changes was to provide the last missing time functions for x64 builds, so we would have all of them for all msvcrt builds on all windows versions. In my opinion those changes, including the documentation one, are rather small and isolated. So I think that it does not increase complexity of code compared with previous time function changes which were rather larger and I have not received from you negative feedback on it. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
