From 06697a8234b51338f521bf6cfa9dfbd709fd2ebc Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 19 Apr 2010 08:23:29 +0000 Subject: Fix [Patch 2986105]: conditionally defining strcasecmp/strncasecmp --- ChangeLog | 5 +++++ win/tkWinPort.h | 58 +++++++++++++++++++++++++++++---------------------------- 2 files changed, 35 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 210ace8..018dfe0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-19 Jan Nijtmans + + * win/tkWinPort.h Fix [Patch 2986105]: conditionally defining + strcasecmp/strncasecmp + 2010-03-12 Jan Nijtmans * generic/tkButton.h: [Bug 2956548]: TkpButtonSetDefaults only diff --git a/win/tkWinPort.h b/win/tkWinPort.h index cb8def1..31d020d 100644 --- a/win/tkWinPort.h +++ b/win/tkWinPort.h @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinPort.h,v 1.10 2005/09/28 18:31:57 dgp Exp $ + * RCS: @(#) $Id: tkWinPort.h,v 1.10.4.1 2010/04/19 08:23:31 nijtmans Exp $ */ #ifndef _WINPORT @@ -42,19 +42,39 @@ #endif #include -#ifdef __CYGWIN__ -# define _T(x) L##x -#else -# include -#endif #ifdef _MSC_VER -# define hypot _hypot +# ifndef hypot +# define hypot _hypot +# endif #endif /* _MSC_VER */ -#ifndef __GNUC__ -# define strncasecmp strnicmp -# define strcasecmp stricmp +/* + * 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 +#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 #endif #define NBBY 8 @@ -119,22 +139,4 @@ #define TkpCreateNativeBitmap(display, source) None #define TkpGetNativeAppBitmap(display, name, w, h) None -/* - * Define timezone for gettimeofday. - */ - -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; - -/* - * Disabled inclusion of Tcl's private header in hope of discovering we - * no longer need it. - * -#ifndef _TCLINT -#include -#endif - */ - #endif /* _WINPORT */ -- cgit v0.12