summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <jan.nijtmans@noemail.net>2012-05-14 14:42:10 (GMT)
committerjan.nijtmans <jan.nijtmans@noemail.net>2012-05-14 14:42:10 (GMT)
commit074c6d344bdbeb0aec07b29761111253259d832e (patch)
treeb96718373d9acc8338ab44371c00f49ed881bbab /win
parentf55e39f2d24d72be4c038bec9270cef8823461c5 (diff)
downloadtk-074c6d344bdbeb0aec07b29761111253259d832e.zip
tk-074c6d344bdbeb0aec07b29761111253259d832e.tar.gz
tk-074c6d344bdbeb0aec07b29761111253259d832e.tar.bz2
backport TCHAR determination from tkWinPort.h
FossilOrigin-Name: 282c5ca9fbe48a19494c5849b2774d22d1090b5b
Diffstat (limited to 'win')
-rw-r--r--win/tkWinPort.h38
1 files changed, 13 insertions, 25 deletions
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 9deefce..73a511c 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -50,33 +50,21 @@
/*
* 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
-# if defined(_MSC_VER) && defined(__STDC__)
- /* VS2005 SP1 misses this. See [Bug #3110161] */
- typedef _TCHAR TCHAR;
-# endif
+#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
-#ifdef __CYGWIN__
-# ifndef _vsnprintf
-# define _vsnprintf vsnprintf
-# endif
-# ifndef _wcsicmp
-# define _wcsicmp wcscasecmp
-# endif
-#else
-# ifndef strncasecmp
-# define strncasecmp strnicmp
-# endif
-# ifndef strcasecmp
-# define strcasecmp stricmp
-# endif
+
+#ifndef __GNUC__
+# define strncasecmp strnicmp
+# define strcasecmp stricmp
#endif
#define NBBY 8