From 524b0f2d00b99d18e37e281905c73ec37c565a66 Mon Sep 17 00:00:00 2001 From: mdejong Date: Thu, 19 Jul 2001 06:40:09 +0000 Subject: * generic/tclPlatDecls.h: Define TCHAR by including windows.h instead of tchar.h since Cygwin does not support the tchar.h header. Include CHECK_UNICODE_CALLS logic from tclWinPort.h. * win/tclWinPort.h: Remove CHECK_UNICODE_CALLS logic. Remove include of windows.h since this now done it tclPlatDecls.h. * win/tclWinReg.c: Remove duplicate include of windows.h. --- ChangeLog | 11 +++++++++++ generic/tclPlatDecls.h | 32 +++++++++++++++++++++++++------- win/tclWinPort.h | 19 +------------------ win/tclWinReg.c | 6 +----- 4 files changed, 38 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0e03fd..df6a0cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2001-07-18 Mo DeJong + + * generic/tclPlatDecls.h: Define TCHAR by including + windows.h instead of tchar.h since Cygwin does not + support the tchar.h header. Include CHECK_UNICODE_CALLS + logic from tclWinPort.h. + * win/tclWinPort.h: Remove CHECK_UNICODE_CALLS logic. + Remove include of windows.h since this now done it + tclPlatDecls.h. + * win/tclWinReg.c: Remove duplicate include of windows.h. + 2001-07-18 Andreas Kupries * generic/tclIO.c: Aftermath to [SF #427196]. Squash empty buffers diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index 897d052..7faa605 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,20 +6,38 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.6 2000/08/20 03:51:23 davidg Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.7 2001/07/19 06:40:09 mdejong Exp $ */ #ifndef _TCLPLATDECLS #define _TCLPLATDECLS /* - * Pull in the definition of TCHAR. Hopefully the compile flags - * of the core are matching against your project build for these - * public functions. BE AWARE. + * Define TCHAR by pulling in . Hopefully the compile flags + * of the Tcl core will match those of your project so that TCHAR + * will be defined the same way. BE AWARE. */ -#if defined(__WIN32__) && !defined(_INC_TCHAR) -#include -#endif + +#ifdef __WIN32__ + +#ifdef CHECK_UNICODE_CALLS + +#define _UNICODE +#define UNICODE + +#define __TCHAR_DEFINED +typedef float *_TCHAR; + +#define _TCHAR_DEFINED +typedef float *TCHAR; + +#endif /* CHECK_UNICODE_CALLS */ + +# define WIN32_LEAN_AND_MEAN +# include +# undef WIN32_LEAN_AND_MEAN + +#endif /* __WIN32__ */ /* !BEGIN!: Do not edit below this line. */ diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 3b223b8..dd4d25e 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinPort.h,v 1.16 2001/07/17 18:33:24 mdejong Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.17 2001/07/19 06:40:09 mdejong Exp $ */ #ifndef _TCLWINPORT @@ -20,19 +20,6 @@ # 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 - /* *--------------------------------------------------------------------------- * The following sets of #includes and #ifdefs are required to get Tcl to @@ -66,10 +53,6 @@ typedef float *TCHAR; #include #include -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN - #ifdef BUILD_tcl # undef TCL_STORAGE_CLASS # define TCL_STORAGE_CLASS DLLEXPORT diff --git a/win/tclWinReg.c b/win/tclWinReg.c index b5931fc..5799f86 100644 --- a/win/tclWinReg.c +++ b/win/tclWinReg.c @@ -11,16 +11,12 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinReg.c,v 1.12 2000/06/13 20:30:24 ericm Exp $ + * RCS: @(#) $Id: tclWinReg.c,v 1.13 2001/07/19 06:40:09 mdejong Exp $ */ #include #include -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN - /* * TCL_STORAGE_CLASS is set unconditionally to DLLEXPORT because the * Registry_Init declaration is in the source file itself, which is only -- cgit v0.12