summaryrefslogtreecommitdiffstats
path: root/win/tkWinPort.h
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-05-14 13:34:36 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-05-14 13:34:36 (GMT)
commit4c2e9ac08b3332e2a53b28a352f24dc863be9873 (patch)
treebc7445d3c1d39569e0d4246ee02eb80dd83642aa /win/tkWinPort.h
parentf6b9aa40d70f1d9a0402cbeb02445ef4a778b0e5 (diff)
downloadtk-4c2e9ac08b3332e2a53b28a352f24dc863be9873.zip
tk-4c2e9ac08b3332e2a53b28a352f24dc863be9873.tar.gz
tk-4c2e9ac08b3332e2a53b28a352f24dc863be9873.tar.bz2
implement TkSetPixmapColormap and TkpPrintWindowId for cygwin
export TkWinChildProc for win32 backport TCHAR determination from tkWinPort.h FossilOrigin-Name: b8bf82483ca7c90eecc13f1845302764cfebb003
Diffstat (limited to 'win/tkWinPort.h')
-rw-r--r--win/tkWinPort.h24
1 files changed, 18 insertions, 6 deletions
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index f991195..77408dc 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -40,16 +40,28 @@
#endif
#include <time.h>
-#ifdef __CYGWIN__
-# define _T(x) L##x
-#else
-# include <tchar.h>
-#endif
#ifdef _MSC_VER
-# define hypot _hypot
+# ifndef hypot
+# define hypot _hypot
+# endif
#endif /* _MSC_VER */
+/*
+ * Pull in the typedef of TCHAR for windows.
+ */
+#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;
+#endif
+
+
#ifndef __GNUC__
# define strncasecmp strnicmp
# define strcasecmp stricmp