Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3cfc01259f2aaa229f1f77277a6562d49d846d82
Ticket: 442178ffffffffffffffffffffffffffffffffff
Cygwin TCHAR in tclPlatDecls.h fix
User & Date: mdejong on 2001-07-18 13:27:02
Changes

  1. icomment:
    Logged In: YES 
    user_id=90858
    
    Humm, that is an interesting point.
    
    If you look at the top of the tclWinPort.h
    file, you will find the following:
    
    #ifndef _TCLINT
    #   include "tclInt.h"
    #endif
    
    #ifdef CHECK_UNICODE_CALLS
    
    #define _UNICODE
    #define UNICODE
    
    #define __TCHAR_DEFINED
    typedef float *_TCHAR;
    
    #define _TCHAR_DEFINED
    typedef float *TCHAR;
    
    #endif
    
    I was under the impression that defining
    _UNICODE and then pulling in <windows.h>
    would define TCHAR as wchar_t. It seems
    odd that it is already typedefed as a
    float* here. Any idea what is going on
    there? If we pull in <windows.h> in tclPlatDecls.h
    then it will not be defined the same way as
    in tclWinPort.h because _UNICODE is not defined.
    
    Also, it seems like <windows.h> is getting
    pulled in multiple times, even when it is
    not needed. For example, removing this
    include seems fine since  <tclPort.h>
    already pulls <tclWinPort.h> which includes
    <windows.h>. There is also one in tclAppInit.c,
    but I am not sure about that on.
    
    
    diff -u -r1.12 tclWinReg.c
    --- win/tclWinReg.c     2000/06/13 20:30:24     1.12
    +++ win/tclWinReg.c     2001/07/18 06:20:08
    @@ -17,10 +17,6 @@
     #include <tclPort.h>
     #include <stdlib.h>
     
    -#define WIN32_LEAN_AND_MEAN
    -#include <windows.h>
    -#undef WIN32_LEAN_AND_MEAN
    -
    
    
    
  2. login: "mdejong"
  3. mimetype: "text/plain"
  4. username: "mdejong"