Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 908727545a20aa129a7280a1b2913baa8451429e
Ticket: 3571241fffffffffffffffffffffffffffffffff
_USE_32BIT_TIME_T wrong for 32bit __MINGW32__
User & Date: earnie on 2013-05-22 04:28:05
Changes

  1. icomment:
    >  and that's how Microsoft is using it in it's own header files. I think that mingw should do the same.
    
    We simply cannot.  We support legacy while newer versions of MSVC are supporting cutting-edge.  It's a nightmare either for the compilation, the link or the execution depending on what we do.  MinGW builds to -lmsvcrt by default since it is guaranteed to be on the system as the system C library;  while MSVC builds to -lmsvcr## by default (where ## is the version used by the compiler) since it is part of the product.
    
    Now the MinGW user can specify -lmsvcr80 to get the appropriate functions but that runs into known collision issues since msvcrt.dll and mscvr80.dll will both be used and they both control memory independently so it is discouraged.
    
    Now I have a dilemma in that I need to support at least Windows 2000 and its version of MSVCRT.DLL which will not contain the needed functions for _USE_32BIT_TIME_T and even if the OS does such as Vista and above the MinGW libmsvcrt.a import library doesn't define them since we cannot ensure that they are contained in it.  The MinGW user has a choice to use the MSVCRT.DLL directly to link against and that works when the functions exist in it.
    
    I need to think about what we want to do and query the users to determine best course of action for MinGW but since you've included the _USE_32BIT_TIME_T macro by default you'll need to be aware of the options for the user and document it.
    
    I've attached the patch I'm contemplating.  It adds a warning when MSVCRT_VERSION is not >= 800 and _USE_32BIT_TIME_T is defined.  It currently defines _USE_32BIT_TIME_T if MSVCRT_VERSION is >= 800 but I don't think that will stay since libmsvcrt.a doesn't contain the import of the functions.  It will depend on the users desires after I ask them about it.
    
    
  2. login: "earnie"
  3. mimetype: "text/plain"
  4. username: "earnie"