summaryrefslogtreecommitdiffstats
path: root/win/tkWinPort.h
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinPort.h')
-rw-r--r--win/tkWinPort.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/win/tkWinPort.h b/win/tkWinPort.h
index 83b67c6..75c7d22 100644
--- a/win/tkWinPort.h
+++ b/win/tkWinPort.h
@@ -14,21 +14,23 @@
#ifndef _WINPORT
#define _WINPORT
-#include <X11/Xlib.h>
-#include <X11/cursorfont.h>
-#include <X11/keysym.h>
-#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 <malloc.h>
+#include <wchar.h>
+#include <io.h>
+#include <stdlib.h>
#include <errno.h>
+#include <fcntl.h>
+#include <malloc.h>
#include <ctype.h>
#include <math.h>
-#include <stdlib.h>
#include <string.h>
#include <limits.h>
-#include <fcntl.h>
-#include <io.h>
/*
* Need to block out this include for building extensions with MetroWerks
@@ -61,6 +63,11 @@
typedef _TCHAR TCHAR;
#endif
+#include <X11/Xlib.h>
+#include <X11/cursorfont.h>
+#include <X11/keysym.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
#ifndef __GNUC__
# define strncasecmp strnicmp
@@ -105,7 +112,7 @@
* The following functions are implemented as macros under Windows.
*/
-#define XFree(data) {if ((data) != NULL) ckfree((char *) (data));}
+#define XFree(data) {if ((data) != NULL) ckfree(data);}
#define XNoOp(display) {display->request++;}
#define XSynchronize(display, bool) {display->request++;}
#define XSync(display, bool) {display->request++;}