summaryrefslogtreecommitdiffstats
path: root/win/tclWinPort.h
diff options
context:
space:
mode:
Diffstat (limited to 'win/tclWinPort.h')
-rw-r--r--win/tclWinPort.h30
1 files changed, 17 insertions, 13 deletions
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index 01e5432..c7e343f 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -10,12 +10,22 @@
* 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.52 2009/12/21 23:25:41 nijtmans Exp $
+ * RCS: @(#) $Id: tclWinPort.h,v 1.53 2010/01/13 06:46:56 nijtmans Exp $
*/
#ifndef _TCLWINPORT
#define _TCLWINPORT
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef WIN32_LEAN_AND_MEAN
+
+/*
+ * Ask for the winsock function typedefs, also.
+ */
+#define INCL_WINSOCK_API_TYPEDEFS 1
+#include <winsock2.h>
+
#ifdef CHECK_UNICODE_CALLS
# define _UNICODE
# define UNICODE
@@ -32,13 +42,17 @@
*---------------------------------------------------------------------------
*/
+#ifdef __CYGWIN__
+# include <unistd.h>
+# include <wchar.h>
+#else
+# include <io.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
-
#include <errno.h>
#include <fcntl.h>
#include <float.h>
-#include <io.h>
#include <malloc.h>
#include <process.h>
#include <signal.h>
@@ -71,16 +85,6 @@
#include <time.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-
-/*
- * Ask for the winsock function typedefs, also.
- */
-#define INCL_WINSOCK_API_TYPEDEFS 1
-#include <winsock2.h>
-
/*
* Define EINPROGRESS in terms of WSAEINPROGRESS.
*/