On Friday 20 February 2026 14:22:31 Kirill Makurin wrote: > Jacek Caban <[email protected]> wrote: > > Sure, but that is to be expected with older OS versions. They typically > > provide fewer functions than newer versions, and if you want your > > application to run on them, you need to avoid using APIs that are not > > available there. Adding a few random wrappers to mingw-w64 will not > > change that. > > I don't see a problem in providing wrappers for functions missing in earlier > versions of msvcrt.dll. One of usages for msvcrt.dll is to compile code which > can run on pre-XP systems, where it is installed as a system library. 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. Having > such wrappers fixes this issue, making user's life easier. > > These wrappers for time functions are rather simple and I see no harm in > having them, obviously except increased binary size, which is unfortunate. > There are other cases such as `_locale_t` functions, which are simple stubs > in case if they're not available in system's msvcrt.dll, and I don't really > like having them. > > - Kirill Makurin
Hello, in past I have provided missing time functions for more builds and these my changes are the last step for time functions to be available in all builds. So with these changes, any time function (32-bit or 64-bit) can be called from any build (system msvcrt, versioned msvcr* or ucrt) and will be always available on any system. So these changes just complete time functions availability for Windows XP. If application want to target older system then it does not have to care about time functions availability and use complicate ifdef-else-endif conditions and handle different architectures and DLL architectures. For UCRT these functions are already available (even on XP), they were missing only in msvcrt. I understand that they can increase binary size, but the purpose of using msvcrt is for compatibility with older systems or to avoiding installing redistributable package. _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
