Menu

#5115 _USE_32BIT_TIME_T wrong for 32bit __MINGW32__

current: 8.5.14
closed-invalid
5
2014-08-14
2012-09-24
Earnie Boyd
No

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.

Discussion

<< < 1 2 3 > >> (Page 2 of 3)
  • Jan Nijtmans

    Jan Nijtmans - 2012-09-25

    > 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

     
  • Earnie Boyd

    Earnie Boyd - 2012-09-25

    [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.

     
  • Earnie Boyd

    Earnie Boyd - 2012-09-25
    • status: pending-invalid --> open-invalid
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-09-26
    • status: open-invalid --> pending-invalid
     
  • Jan Nijtmans

    Jan Nijtmans - 2012-09-26
    • milestone: --> 3071253
    • labels: --> 52. Portability Support
     
  • Jan Nijtmans

    Jan Nijtmans - 2013-05-16

    suggested fix for mingw headers

     
  • Jan Nijtmans

    Jan Nijtmans - 2013-05-16
    • milestone: 3071253 --> current: 8.5.14
    • status: pending-invalid --> open-invalid
     
  • Jan Nijtmans

    Jan Nijtmans - 2013-05-16

    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.

     
  • Earnie Boyd

    Earnie Boyd - 2013-05-16

    Thanks for the patch. I'll try to incorporate it into the -rc2 release coming soon.

     
  • Earnie Boyd

    Earnie Boyd - 2013-05-17

    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 ...

     
<< < 1 2 3 > >> (Page 2 of 3)