summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-04-15 13:58:44 (GMT)
committernijtmans <nijtmans>2010-04-15 13:58:44 (GMT)
commitdb01c2c09b47edf7346c5179c24675864c03d1f9 (patch)
tree96f83479f2f1ad77df6267467be146d8e7018a9b
parentd38a5b66d8690611d238c2510750e024cc9570a9 (diff)
downloadtcl-db01c2c09b47edf7346c5179c24675864c03d1f9.zip
tcl-db01c2c09b47edf7346c5179c24675864c03d1f9.tar.gz
tcl-db01c2c09b47edf7346c5179c24675864c03d1f9.tar.bz2
Move inclusion of <tchar.h> from tclPlatDecls.h
to tclWinPort.h, where it belongs. Add fallback in tcl.h, so at least TCHAR typedef is always available in win32, even without <tchar.h> Tk already did the same in tkWinPort.h, now Tcl does it the same (correct) way.
-rw-r--r--ChangeLog7
-rw-r--r--generic/tcl.h8
-rw-r--r--generic/tclPlatDecls.h20
-rw-r--r--win/tclWinPort.h14
4 files changed, 31 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index 3293de9..e82ec18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-04-15 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * win/tclWinPort.h: Move inclusion of <tchar.h> from
+ * generic/tcl.h tclPlatDecls.h to tclWinPort.h,
+ * generic/tclPlatDecls.h where it belongs. Add fallback in
+ tcl.h, so TCHAR is available in win32 always
+
2010-04-15 Donal K. Fellows <dkf@users.sf.net>
* doc/try.n: [Bug 2987551]: Fix typo.
diff --git a/generic/tcl.h b/generic/tcl.h
index 5420c7b..6aff11d 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.302 2010/02/16 16:30:52 dkf Exp $
+ * RCS: @(#) $Id: tcl.h,v 1.303 2010/04/15 13:58:44 nijtmans Exp $
*/
#ifndef _TCL
@@ -2375,6 +2375,12 @@ EXTERN const char * Tcl_PkgInitStubsCheck(Tcl_Interp *interp,
EXTERN void Tcl_GetMemoryInfo(Tcl_DString *dsPtr);
#endif
+#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
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index 34d05fd..b9117ac 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.37 2010/02/05 10:03:23 nijtmans Exp $
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.38 2010/04/15 13:58:44 nijtmans Exp $
*/
#ifndef _TCLPLATDECLS
@@ -24,22 +24,10 @@
#endif
/*
- * Pull in the typedef of TCHAR for windows.
+ * WARNING: This file is automatically generated by the tools/genStubs.tcl
+ * script. Any modifications to the function declarations below should be made
+ * in the generic/tcl.decls script.
*/
-#if defined(__CYGWIN__)
- typedef char TCHAR;
-#elif defined(__WIN32__) && !defined(_TCHAR_DEFINED)
-# include <tchar.h>
-# ifndef _TCHAR_DEFINED
- /* Borland seems to forget to set this. */
- typedef _TCHAR TCHAR;
-# define _TCHAR_DEFINED
-# endif
-# if defined(_MSC_VER) && defined(__STDC__)
- /* MSVC++ misses this. */
- typedef _TCHAR TCHAR;
-# endif
-#endif
/* !BEGIN!: Do not edit below this line. */
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index b5edc6e..204181f 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.55 2010/04/13 13:37:28 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.56 2010/04/15 13:58:44 nijtmans Exp $
*/
#ifndef _TCLWINPORT
@@ -36,6 +36,18 @@
#endif /* CHECK_UNICODE_CALLS */
/*
+ * Pull in the typedef of TCHAR for windows.
+ */
+#if !defined(_TCHAR_DEFINED)
+# include <tchar.h>
+# ifndef _TCHAR_DEFINED
+ /* Borland seems to forget to set this. */
+ typedef _TCHAR TCHAR;
+# define _TCHAR_DEFINED
+# endif
+#endif
+
+/*
*---------------------------------------------------------------------------
* The following sets of #includes and #ifdefs are required to get Tcl to
* compile under the windows compilers.