Menu

#399 Support build with MSVC++ 8

closed-accepted
7
2005-11-03
2005-01-06
Pat Thoyts
No

NOTE: this patch is provided to record the
modifications required. It is not intended to actually
be applied until this compiler is officially released.

This patch contains a number of changes required to
compile Tcl using Microsoft Visual C++ 8 which is
currently provided as part of the Microsoft Visual
Studio 2005 Beta.

To summarize:

regerror.c:
errcode is a typedef declared in the windows headers.

tclWinPort.h:
A large number of C library functions have been
marked as depreciated as part of some secure
programming drive at MS. This suppresses the warnings.

tcl.h:
By default time_t is declared as a 64 bit value. Tcl
can't cope with this so we define _USE_32BIT_TIME_T.
This means we must use a compatible struct version for
Tcl_StatBuf

nmakehlp.c:
The error codes have changed.

rules.vc:
makefile.vc:
We need more options checking as a number have been
removed.

The result is that Tcl now compiles without warnings.
There are 11 test suite failures and one crash. The
crash is caused by the C runtime when we try to convert
an illegal time value ( a legitimate test - blame
microsoft). The other failures are due to some change
in the putenv() function which appears to no longer be
changing the environment.

Discussion

  • Pat Thoyts

    Pat Thoyts - 2005-01-06

    msvc8 support patch

     
  • Pat Thoyts

    Pat Thoyts - 2005-05-26

    Logged In: YES
    user_id=202636

    The crash mentioned about was indeed a but in Microsoft's C
    library shipped with the above compiler. MS replied to me
    that this has been fixed so more recent versions should be ok.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2005-05-26

    Logged In: YES
    user_id=72656

    So an updated patch is needed right - 64-bit time_t *should*
    work in Tcl (as Solaris 64 bit uses it, among other 64-bit
    OSes).

     
  • Jeff McWilliams

    Jeff McWilliams - 2005-05-26

    Logged In: YES
    user_id=1285984

    Which specific version of the compiler were you using?

    I'm using the VS.NET 2005 Beta 2.

    cl.exe emits the following version:

    14.00.50215.44 for X64.

     
  • Jeff McWilliams

    Jeff McWilliams - 2005-05-26

    Logged In: YES
    user_id=1285984

    Which version of the compiler are you referring to with the
    bugs, Pat?

    I'm using VS.NET 2005 Beta 2.

    cl yields:

    Version 14.00.50215.44 for X64

    Jeff

     
  • Pat Thoyts

    Pat Thoyts - 2005-06-05

    Logged In: YES
    user_id=202636

    I originally developed this patch on the beta1 release -
    version 14.00.40607.16 for 80x86. I have recently installed
    the beta 2 release which is version 14.00.50215.44 and this
    is almost identical as far as I can see.

    I raised the following bug with MS:
    http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=7a8c7299-f442-4d8e-95b4-9743ead00f33
    but while they state this is fixed -- I find this not to be
    the case.

     
  • Nobody/Anonymous

    Patch to enable building tcl using MSVC 8.

     
  • Pat Thoyts

    Pat Thoyts - 2005-11-02
    • priority: 1 --> 7
     
  • Pat Thoyts

    Pat Thoyts - 2005-11-02

    Logged In: YES
    user_id=202636

    Final version - the env.test failures were due to the test
    interpreter removing an essential environment variable
    (SYSTEMROOT). We have had to add a few casts to avoid
    complaints about assigning from the 64bit time_t to int or
    long. Microsoft fixed the mktime() crashing issue reported
    above.

     
  • Pat Thoyts

    Pat Thoyts - 2005-11-02

    Final version.

     
  • Pat Thoyts

    Pat Thoyts - 2005-11-03
    • status: open --> closed-accepted
     
  • Pat Thoyts

    Pat Thoyts - 2005-11-03

    Logged In: YES
    user_id=202636

    Now that MSVC8 has been release - applied patch.

     
  • Nobody/Anonymous

    Logged In: NO

    to Build with MSVC8

     
MongoDB Logo MongoDB