summaryrefslogtreecommitdiffstats
path: root/win/tkWinPort.h
diff options
context:
space:
mode:
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