This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
qt patch for winnt.h
- From: Nicholas Wourms <nwourms at netscape dot net>
- To: 'Cygwin-Patches' <cygwin-patches at sources dot redhat dot com>
- Date: Thu, 25 Jul 2002 11:29:20 -0400
- Subject: qt patch for winnt.h
Hi,
As you may or may not know, I'm going to be providing the QT-2.3.1
package for the main cygwin distribution. However, an annoying
"feature" of QT is that one of its typdefs conflicts with a typedef in
winnt.h [typedef void *HANDLE]. However, QT requires [typedef unsigned
int HANDLE] and refuses to compile with the wrong typedef. Ralf has
tried everything over at the kde-cygwin project to get around this
without tampering with the system headers. In the end, however, we
discovered that it would require a massive overhaul of qt-2 to do this.
Therefore we think it would be much more simple to just add a gaurded
#ifndef to winnt.h. That way it will continue to work as it always has
-- unless you define QT_CYGWIN -- in which case the typedef for qt would
be used instead. Attached is the patch and ChangeLog.
Cheers,
Nicholas
2002-07-25 Nicholas Wourms <nwourms@netscape.net>
* winnt.h (HANDLE): Add guard for compiling qt.
Index: winnt.h
===================================================================
RCS file: /cvs/src/src/winsup/w32api/include/winnt.h,v
retrieving revision 1.52
diff -u -3 -p -u -p -r1.52 winnt.h
--- winnt.h 17 Jul 2002 03:37:45 -0000 1.52
+++ winnt.h 25 Jul 2002 15:09:11 -0000
@@ -108,7 +108,11 @@ typedef const TCHAR *LPCTSTR;
#define TEXT(q) __TEXT(q)
typedef SHORT *PSHORT;
typedef LONG *PLONG;
+#ifndef QT_CYGWIN /* To allow qt to compile under Cygwin */
typedef void *HANDLE;
+#else
+typedef unsigned int HANDLE;
+#endif /* QT_CYGWIN */
typedef HANDLE *PHANDLE,*LPHANDLE;
#ifdef STRICT
#define DECLARE_HANDLE(n) typedef struct n##__{int i;}*n