diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-15 21:03:06 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-03-15 21:03:06 (GMT) |
commit | 5841a02367f05ffbefe36849606d77718a556cb2 (patch) | |
tree | 925f152d32d79c91ee0cf085598a2e2ec7210e16 /win/tclWinPort.h | |
parent | 694826cd4f14b00837bf163b8e22f3c01dd2b2db (diff) | |
parent | 87085c466a1fdc5cfdb3cc6ce2659b4371c0b1b3 (diff) | |
download | tcl-5841a02367f05ffbefe36849606d77718a556cb2.zip tcl-5841a02367f05ffbefe36849606d77718a556cb2.tar.gz tcl-5841a02367f05ffbefe36849606d77718a556cb2.tar.bz2 |
[Bug 3288345] Wrong Tcl_StatBuf used on Cygwin
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r-- | win/tclWinPort.h | 55 |
1 files changed, 9 insertions, 46 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h index 4855d12..e2cac52 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -51,12 +51,7 @@ typedef DWORD_PTR * PDWORD_PTR; *--------------------------------------------------------------------------- */ -#ifdef __CYGWIN__ -# include <unistd.h> -# include <wchar.h> -#else -# include <io.h> -#endif +#include <io.h> #include <stdio.h> #include <stdlib.h> #include <errno.h> @@ -68,18 +63,11 @@ typedef DWORD_PTR * PDWORD_PTR; #include <string.h> #include <limits.h> -#ifdef __CYGWIN__ -# include <unistd.h> -# ifndef _wcsicmp -# define _wcsicmp wcscasecmp -# endif -#else -# ifndef strncasecmp -# define strncasecmp strnicmp -# endif -# ifndef strcasecmp -# define strcasecmp stricmp -# endif +#ifndef strncasecmp +# define strncasecmp strnicmp +#endif +#ifndef strcasecmp +# define strcasecmp stricmp #endif /* @@ -113,25 +101,6 @@ typedef DWORD_PTR * PDWORD_PTR; #undef ENOTSUP #define ENOTSUP -1030507 -/* - * cygwin does not have this struct. - */ -#ifdef __CYGWIN__ - struct _stat32i64 { - dev_t st_dev; - ino_t st_ino; - unsigned short st_mode; - short st_nlink; - short st_uid; - short st_gid; - dev_t st_rdev; - __int64 st_size; - struct {long tv_sec;} st_atim; - struct {long tv_sec;} st_mtim; - struct {long tv_sec;} st_ctim; - }; -#endif - /* Those codes, from Visual Studio 2010, conflict with other values */ #undef ENODATA #undef ENOMSG @@ -478,18 +447,12 @@ typedef DWORD_PTR * PDWORD_PTR; * use by tclAlloc.c. */ -#ifdef __CYGWIN__ -# define TclpSysAlloc(size, isBin) malloc((size)) -# define TclpSysFree(ptr) free((ptr)) -# define TclpSysRealloc(ptr, size) realloc((ptr), (size)) -#else -# define TclpSysAlloc(size, isBin) ((void*)HeapAlloc(GetProcessHeap(), \ +#define TclpSysAlloc(size, isBin) ((void*)HeapAlloc(GetProcessHeap(), \ (DWORD)0, (DWORD)size)) -# define TclpSysFree(ptr) (HeapFree(GetProcessHeap(), \ +#define TclpSysFree(ptr) (HeapFree(GetProcessHeap(), \ (DWORD)0, (HGLOBAL)ptr)) -# define TclpSysRealloc(ptr, size) ((void*)HeapReAlloc(GetProcessHeap(), \ +#define TclpSysRealloc(ptr, size) ((void*)HeapReAlloc(GetProcessHeap(), \ (DWORD)0, (LPVOID)ptr, (DWORD)size)) -#endif /* * The following defines map from standard socket names to our internal |