diff options
author | nijtmans <nijtmans> | 2010-04-22 11:40:31 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-04-22 11:40:31 (GMT) |
commit | 4c3a083386d8c35e9a7d32b9f88b3ba9dc9fc9de (patch) | |
tree | b4c7c5b00f25f4e8cf1882d5b5e88eb39f9d3799 /generic | |
parent | 833ea84043d927c416802983797aa3884a894012 (diff) | |
download | tcl-4c3a083386d8c35e9a7d32b9f88b3ba9dc9fc9de.zip tcl-4c3a083386d8c35e9a7d32b9f88b3ba9dc9fc9de.tar.gz tcl-4c3a083386d8c35e9a7d32b9f88b3ba9dc9fc9de.tar.bz2 |
Move TCHAR fallback typedef from tcl.h to tclPlatDecls.h (as suggested by dgp)
Eliminate various unnecessary type casts.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 14 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 4 | ||||
-rw-r--r-- | generic/tclInt.h | 4 | ||||
-rw-r--r-- | generic/tclPlatDecls.h | 15 |
4 files changed, 19 insertions, 18 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index f9ce79a..8fd5772 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.304 2010/04/15 14:56:32 nijtmans Exp $ + * RCS: @(#) $Id: tcl.h,v 1.305 2010/04/22 11:40:31 nijtmans Exp $ */ #ifndef _TCL @@ -2376,18 +2376,6 @@ EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr); #endif /* - * Unfortunately, TCHAR is needed in tclPlatDecls.h for - * win32, so if TCHAR is not defined yet do it here. - * This way, we don't need to include <tchar.h> just - * for one define. - */ -#if !defined(_TCHAR_DEFINED) -# if defined(__WIN32__) - typedef char TCHAR; -# define _TCHAR_DEFINED -# endif -#endif -/* *---------------------------------------------------------------------------- * Include the public function declarations that are accessible via the stubs * table. diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 6723f27..69114e3 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -17,7 +17,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIOUtil.c,v 1.174 2010/04/04 15:11:51 dkf Exp $ + * RCS: @(#) $Id: tclIOUtil.c,v 1.175 2010/04/22 11:40:31 nijtmans Exp $ */ #include "tclInt.h" @@ -4568,7 +4568,7 @@ const char * Tcl_FSGetNativePath( Tcl_Obj *pathPtr) { - return (const char *) Tcl_FSGetInternalRep(pathPtr, &tclNativeFilesystem); + return Tcl_FSGetInternalRep(pathPtr, &tclNativeFilesystem); } /* diff --git a/generic/tclInt.h b/generic/tclInt.h index 047a823..d04bd07 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.468 2010/04/05 19:44:45 ferrieux Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.469 2010/04/22 11:40:31 nijtmans Exp $ */ #ifndef _TCLINT @@ -64,7 +64,7 @@ typedef int ptrdiff_t; #endif /* - * Ensure WORDS_BIGENDIAN is defined correcly: + * Ensure WORDS_BIGENDIAN is defined correctly: * Needs to happen here in addition to configure to work with fat compiles on * Darwin (where configure runs only once for multiple architectures). */ diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h index b9117ac..6d44a7e 100644 --- a/generic/tclPlatDecls.h +++ b/generic/tclPlatDecls.h @@ -6,7 +6,7 @@ * Copyright (c) 1998-1999 by Scriptics Corporation. * All rights reserved. * - * RCS: @(#) $Id: tclPlatDecls.h,v 1.38 2010/04/15 13:58:44 nijtmans Exp $ + * RCS: @(#) $Id: tclPlatDecls.h,v 1.39 2010/04/22 11:40:31 nijtmans Exp $ */ #ifndef _TCLPLATDECLS @@ -29,6 +29,19 @@ * in the generic/tcl.decls script. */ +/* + * TCHAR is needed here for win32, so if it is not defined yet do it here. + * This way, we don't need to include <tchar.h> just for one define. + */ +#if defined(_WIN32) && !defined(_TCHAR_DEFINED) +# if defined(_UNICODE) + typedef wchar_t TCHAR; +# else + typedef char TCHAR; +# endif +# define _TCHAR_DEFINED +#endif + /* !BEGIN!: Do not edit below this line. */ /* |