From b6ab10bda69750ba403ab63c010db76cc35e6f49 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 14 May 2012 14:42:10 +0000 Subject: backport TCHAR determination from tkWinPort.h --- win/tkWinPort.h | 38 +++++++++++++------------------------- 1 file 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 -# 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 +#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 -- cgit v0.12