diff options
author | nijtmans <nijtmans> | 2010-04-19 07:40:41 (GMT) |
---|---|---|
committer | nijtmans <nijtmans> | 2010-04-19 07:40:41 (GMT) |
commit | 28cb1b866aacffd894f7a4964e5cc9f82ed4b1ab (patch) | |
tree | 7264fb2e9b354342117754d52b7eeff2d7de0b7f /win/tclWinPort.h | |
parent | dbe2be4be95c7ab2d781711feeb867a596d2d35a (diff) | |
download | tcl-28cb1b866aacffd894f7a4964e5cc9f82ed4b1ab.zip tcl-28cb1b866aacffd894f7a4964e5cc9f82ed4b1ab.tar.gz tcl-28cb1b866aacffd894f7a4964e5cc9f82ed4b1ab.tar.bz2 |
Fix [Patch 2986105]: conditionally defining strcasecmp/strncasecmp
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r-- | win/tclWinPort.h | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 039ba33..1063b88 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.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: tclWinPort.h,v 1.50.2.1 2010/01/31 23:51:37 nijtmans Exp $ + * RCS: @(#) $Id: tclWinPort.h,v 1.50.2.2 2010/04/19 07:40:41 nijtmans Exp $ */ #ifndef _TCLWINPORT @@ -58,14 +58,18 @@ #include <signal.h> #include <string.h> -/* - * These string functions are not defined with the same names on Windows. - */ - -#ifndef __CYGWIN__ -#define wcscasecmp _wcsicmp -#define strcasecmp stricmp -#define strncasecmp strnicmp +#ifdef __CYGWIN__ +# include <unistd.h> +# ifndef _wcsicmp +# define _wcsicmp wcscasecmp +# endif +#else +# ifndef strncasecmp +# define strncasecmp strnicmp +# endif +# ifndef strcasecmp +# define strcasecmp stricmp +# endif #endif /* @@ -305,7 +309,7 @@ */ #ifndef S_IFLNK -#define S_IFLNK 0120000 /* Symbolic Link */ +# define S_IFLNK 0120000 /* Symbolic Link */ #endif #ifndef S_ISREG @@ -357,11 +361,11 @@ */ #ifndef MAXPATH -#define MAXPATH MAX_PATH +# define MAXPATH MAX_PATH #endif /* MAXPATH */ #ifndef MAXPATHLEN -#define MAXPATHLEN MAXPATH +# define MAXPATHLEN MAXPATH #endif /* MAXPATHLEN */ /* @@ -382,13 +386,13 @@ */ #if defined(_MSC_VER) || defined(__MINGW32__) -# define environ _environ -# define hypot _hypot -# define exception _exception -# undef EDEADLOCK -# if defined(__MINGW32__) && !defined(__MSVCRT__) +# define environ _environ +# define hypot _hypot +# define exception _exception +# undef EDEADLOCK +# if defined(__MINGW32__) && !defined(__MSVCRT__) # define timezone _timezone -# endif +# endif #endif /* _MSC_VER || __MINGW32__ */ /* @@ -402,8 +406,8 @@ #ifdef __CYGWIN__ /* On Cygwin, the environment is imported from the Cygwin DLL. */ -# define putenv TclCygwinPutenv -# define timezone _timezone +# define putenv TclCygwinPutenv +# define timezone _timezone #endif /* __CYGWIN__ */ |