summaryrefslogtreecommitdiffstats
path: root/generic/tclPlatDecls.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-07 08:21:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-07 08:21:04 (GMT)
commit44f9dae0c50ffda941a790229ff3df1eec600aae (patch)
treebb763a092ea76fe2911650415497564331107af9 /generic/tclPlatDecls.h
parent5eb15ad21fe5fc08b93ebb556b553af65f082ffc (diff)
parente40e34cb04d940b132e66ccd21b3018a68ffe3f7 (diff)
downloadtcl-44f9dae0c50ffda941a790229ff3df1eec600aae.zip
tcl-44f9dae0c50ffda941a790229ff3df1eec600aae.tar.gz
tcl-44f9dae0c50ffda941a790229ff3df1eec600aae.tar.bz2
move TCHAR definition for Cygwin from tclUnixPort.h to tclPlatDecls.h,
so it can be used for the Plat* interfaces as well
Diffstat (limited to 'generic/tclPlatDecls.h')
-rw-r--r--generic/tclPlatDecls.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index d52a736..3d6339b 100644
--- a/generic/tclPlatDecls.h
+++ b/generic/tclPlatDecls.h
@@ -22,19 +22,16 @@
#endif
/*
- * Pull in the typedef of TCHAR for windows.
+ * 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)
-# 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__)
- /* VS2005 SP1 misses this. See [Bug #3110161] */
- typedef _TCHAR TCHAR;
+#if (defined(_WIN32) || defined(__CYGWIN__)) && !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. */