summaryrefslogtreecommitdiffstats
path: root/win/tkWinPort.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-14 13:34:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-05-14 13:34:36 (GMT)
commit7450408d7048a34daf6788fc4501b58451bfa54b (patch)
treebc7445d3c1d39569e0d4246ee02eb80dd83642aa /win/tkWinPort.h
parent4ee227410ecad38323de7b712664466afd06aab0 (diff)
downloadtk-7450408d7048a34daf6788fc4501b58451bfa54b.zip
tk-7450408d7048a34daf6788fc4501b58451bfa54b.tar.gz
tk-7450408d7048a34daf6788fc4501b58451bfa54b.tar.bz2
implement TkSetPixmapColormap and TkpPrintWindowId for cygwin
export TkWinChildProc for win32 backport TCHAR determination from tkWinPort.h
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