summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornijtmans <nijtmans>2010-04-13 13:46:01 (GMT)
committernijtmans <nijtmans>2010-04-13 13:46:01 (GMT)
commitd5d09dfa63121e855b823ca7ff91239793a1ae57 (patch)
tree8bd5b4041336c4b96ddab9ae833725c614f83611
parent3a855135e0cea5671e8677540fd81e5aaf1cb103 (diff)
downloadtk-d5d09dfa63121e855b823ca7ff91239793a1ae57.zip
tk-d5d09dfa63121e855b823ca7ff91239793a1ae57.tar.gz
tk-d5d09dfa63121e855b823ca7ff91239793a1ae57.tar.bz2
Fix [Patch 2986105]: conditionally defining strcasecmp/strncasecmp
-rw-r--r--ChangeLog5
-rw-r--r--win/tkWinPort.h31
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 <nijtmans@users.sf.net>
+
+ * win/tkWinPort.h Fix [Patch 2986105]: conditionally defining
+ strcasecmp/strncasecmp
+
2010-04-12 Donal K. Fellows <dkf@users.sf.net>
* 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 <X11/Xatom.h>
#include <X11/Xutil.h>
+/*
+ *---------------------------------------------------------------------------
+ * The following sets of #includes and #ifdefs are required to get Tcl to
+ * compile under the windows compilers.
+ *---------------------------------------------------------------------------
+ */
+
#include <wchar.h>
#include <io.h>
#include <stdlib.h>
@@ -45,7 +52,9 @@
#include <time.h>
#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