From d5d09dfa63121e855b823ca7ff91239793a1ae57 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Tue, 13 Apr 2010 13:46:01 +0000 Subject: Fix [Patch 2986105]: conditionally defining strcasecmp/strncasecmp --- ChangeLog | 5 +++++ win/tkWinPort.h | 31 ++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ee48e71..738f9b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-13 Jan Nijtmans + + * win/tkWinPort.h Fix [Patch 2986105]: conditionally defining + strcasecmp/strncasecmp + 2010-04-12 Donal K. Fellows * generic/tkImgPNG.c (WriteIDAT): [Bug 2984787]: Use the correct diff --git a/win/tkWinPort.h b/win/tkWinPort.h index a596de1..f9a9021 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.14 2010/04/08 14:06:20 nijtmans Exp $ + * RCS: @(#) $Id: tkWinPort.h,v 1.15 2010/04/13 13:46:01 nijtmans Exp $ */ #ifndef _WINPORT @@ -22,6 +22,13 @@ #include #include +/* + *--------------------------------------------------------------------------- + * The following sets of #includes and #ifdefs are required to get Tcl to + * compile under the windows compilers. + *--------------------------------------------------------------------------- + */ + #include #include #include @@ -45,7 +52,9 @@ #include #ifdef _MSC_VER -# define hypot _hypot +# ifndef hypot +# define hypot _hypot +# endif #endif /* _MSC_VER */ /* @@ -61,13 +70,21 @@ #endif #ifdef __CYGWIN__ -#define _vsnprintf vsnprintf -#define _wcsicmp wcscasecmp +# 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 strncasecmp strnicmp -#define strcasecmp stricmp - #define NBBY 8 #ifndef OPEN_MAX -- cgit v0.12