4 * This header file handles porting issues that occur because of
5 * differences between Windows and Unix. It should be the only
6 * file that contains #ifdefs to handle different flavors of OS.
8 * Copyright (c) 1995-1996 Sun Microsystems, Inc.
10 * See the file "license.terms" for information on usage and redistribution
11 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
18 *---------------------------------------------------------------------------
19 * The following sets of #includes and #ifdefs are required to get Tcl to
20 * compile under the windows compilers.
21 *---------------------------------------------------------------------------
38 * Need to block out this include for building extensions with MetroWerks
55 * Pull in the typedef of TCHAR for windows.
58 #ifndef _TCHAR_DEFINED
59 /* Borland seems to forget to set this. */
61 # define _TCHAR_DEFINED
63 #if defined(_MSC_VER) && defined(__STDC__)
64 /* VS2005 SP1 misses this. See [Bug #3110161] */
68 #if defined(__GNUC__) && !defined(__cplusplus)
69 # pragma GCC diagnostic ignored "-Wc++-compat"
72 #include <X11/cursorfont.h>
73 #include <X11/keysym.h>
74 #include <X11/Xatom.h>
75 #include <X11/Xutil.h>
78 # define strncasecmp _strnicmp
79 # define strcasecmp _stricmp
89 * The following define causes Tk to use its internal keysym hash table
92 #define REDO_KEYSYM_LOOKUP
95 * See ticket [916c1095438eae56]: GetVersionExW triggers warnings
98 # pragma warning(disable:4146)
99 # pragma warning(disable:4267)
100 # pragma warning(disable:4244)
101 # pragma warning(disable:4311)
102 # pragma warning(disable:4312)
103 # pragma warning(disable:4996)
105 # pragma warning(disable:4305)
110 * The following macro checks to see whether there is buffered
111 * input data available for a stdio FILE.
115 # define TK_READ_DATA_PENDING(f) ((f)->_cnt > 0)
117 # define TK_READ_DATA_PENDING(f) ((f)->level > 0)
118 #endif /* _MSC_VER */
121 * The following Tk functions are implemented as macros under Windows.
124 #define TkpGetPixel(p) (((((p)->red >> 8) & 0xff) \
125 | ((p)->green & 0xff00) | (((p)->blue << 8) & 0xff0000)) | 0x20000000)
131 #define TkpHandleMapOrUnmap(tkwin, event) Tk_HandleEvent(event)
134 * These calls implement native bitmaps which are not currently
135 * supported under Windows. The macros eliminate the calls.
138 #define TkpDefineNativeBitmaps()
139 #define TkpCreateNativeBitmap(display, source) None
140 #define TkpGetNativeAppBitmap(display, name, w, h) None
142 #endif /* _WINPORT */