summaryrefslogtreecommitdiffstats
path: root/win/tclWinPort.h
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r--win/tclWinPort.h35
1 files changed, 12 insertions, 23 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 48f7894..ca6b2bf 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -82,6 +82,7 @@ typedef DWORD_PTR * PDWORD_PTR;
*---------------------------------------------------------------------------
*/
+#include <time.h>
#include <wchar.h>
#include <io.h>
#include <errno.h>
@@ -92,11 +93,9 @@ typedef DWORD_PTR * PDWORD_PTR;
#include <signal.h>
#include <limits.h>
-#ifndef strncasecmp
-# define strncasecmp strnicmp
-#endif
-#ifndef strcasecmp
-# define strcasecmp stricmp
+#ifndef __GNUC__
+# define strncasecmp _strnicmp
+# define strcasecmp _stricmp
#endif
/*
@@ -114,8 +113,6 @@ typedef DWORD_PTR * PDWORD_PTR;
# endif /* __BORLANDC__ */
#endif /* __MWERKS__ */
-#include <time.h>
-
/*
* The following defines redefine the Windows Socket errors as
* BSD errors so Tcl_PosixError can do the right thing.
@@ -436,17 +433,17 @@ typedef DWORD_PTR * PDWORD_PTR;
* EDEADLK as the same value, which confuses Tcl_ErrnoId().
*/
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER) || defined(__MSVCRT__)
# define environ _environ
# if defined(_MSC_VER) && (_MSC_VER < 1600)
# define hypot _hypot
# endif
# define exception _exception
# undef EDEADLOCK
-# if defined(__MINGW32__) && !defined(__MSVCRT__)
+# if defined(_MSC_VER) && (_MSC_VER >= 1700)
# define timezone _timezone
# endif
-#endif /* _MSC_VER || __MINGW32__ */
+#endif /* _MSC_VER || __MSVCRT__ */
/*
* Borland's timezone and environ functions.
@@ -469,11 +466,12 @@ typedef DWORD_PTR * PDWORD_PTR;
* including the *printf family and others. Tell it to shut up.
* (_MSC_VER is 1200 for VC6, 1300 or 1310 for vc7.net, 1400 for 8.0)
*/
-#if _MSC_VER >= 1400
-#pragma warning(disable:4996)
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+# pragma warning(disable:4244)
+# pragma warning(disable:4267)
+# pragma warning(disable:4996)
#endif
-
/*
*---------------------------------------------------------------------------
* The following macros and declarations represent the interface between
@@ -507,7 +505,7 @@ typedef DWORD_PTR * PDWORD_PTR;
* Msvcrt's putenv() copies the string rather than takes ownership of it.
*/
-#if defined(_MSC_VER) || defined(__MINGW32__)
+#if defined(_MSC_VER) || defined(__MSVCRT__)
# define HAVE_PUTENV_THAT_COPIES 1
#endif
@@ -530,15 +528,6 @@ typedef DWORD_PTR * PDWORD_PTR;
#define TclpSysRealloc(ptr, size) ((void*)HeapReAlloc(GetProcessHeap(), \
(DWORD)0, (LPVOID)ptr, (DWORD)size))
-/*
- * The following defines map from standard socket names to our internal
- * wrappers that redirect through the winSock function table (see the
- * file tclWinSock.c).
- */
-
-#define getservbyname TclWinGetServByName
-#define getsockopt TclWinGetSockOpt
-#define setsockopt TclWinSetSockOpt
/* This type is not defined in the Windows headers */
#define socklen_t int