The use of _USE_32BIT_TIME_T requires libmsvcr80.a and the MSVCR80.DLL. The MinGW.org team requires that distributions for software only require MSVCRT.DLL since this is the known system default. To resolve the issue I removed the define for this macro in win/tclWinPort.h to build the software.
> Further inspection shows me that my Windows XP 32bit system doesn't contain
> the 32bit functions in msvcrt.dll but my Windows 7 SysWOW64/msvcrt.dll
> does.
Are you saying that Tcl compiled with mingw and _HAVE_32BIT_TIME_T set will
work on WOW64 but not on Windows XP?
> Do you have any test scripts or know of another tcl dependent package I can
> use to validate this with?
You could try tclvfs, That's a package known to use the Tcl_StatBuf
structure. See:
https://sourceforge.net/projects/tclvfs/
Regards,
Jan Nijtmans
[quote]Are you saying that Tcl compiled with mingw and HAVE_32BIT_TIME_T set will work on WOW64 but not on Windows XP?[/quote]
Yes and no. The functions exist in the DLL but not in the libmsvcrt.a import library supplied by MinGW.org nor by mingw-w64. I need to think about how to deliver an import library for the differing systems. If the user uses msvcrt.dll directly to resolve the symbols instead of the import library then yes it should work. I'll experiment with it.
[quote]You could try tclvfs, That's a package known to use the Tcl_StatBuf structure. See: https://sourceforge.net/projects/tclvfs/\[/quote]
Thanks, I'll give that a try.
suggested fix for mingw headers
When trying the latest w32api-4.0-rc1, I noticed that
the described problem popped-up again. The
fact that _USE_32BIT_TIME_T requires msvcr80
is really a mingw problem, not a Tcl problem:
Older msvcrt.dll's have all 32-bit functions,
they just don't have "32" in the function
names.
See attached "mingw.patch" for my
(minimal) fix to the mingw headers.
It is sufficient for Tcl to compile and
run as expected, but it is not tested
thoroughly.
Please consider this for your
w32api-4.0-rc2.
Thanks for the patch. I'll try to incorporate it into the -rc2 release coming soon.
The patch breaks on XP giving SEGV errors when doing the ``make test' step. I'm testing with the 8.6.0 version. More later ...