This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
RE: qt patch for winnt.h
- From: "Ralf Habacker" <Ralf dot Habacker at freenet dot de>
- To: <cygwin-patches at cygwin dot com>
- Date: Fri, 26 Jul 2002 10:16:08 +0200
- Subject: RE: qt patch for winnt.h
> On Thu, Jul 25, 2002 at 09:43:16PM +0200, Ralf Habacker wrote:
> >> I do prefer feature-centric ifdefs, but I don't think that adding this
> >> particular definition of HANDLE to the windows headers makes sense.
> >
> >I think too, but you have another solution yet. :-)
>
> Not my yob.
>
Why not, you have rich experience in progamming and so on
> Although this is an open source project and you do have the advantage of
> being able to talk to the people who own the system headers, I really think
> that making changes like this in system headers should be done very very
> sparingly.
>
I agree and this this the reason why this thread was started
> >I'm not sure, how this would look in real code, do you have an example ?
>
> #define HANDLE foo_handle
> #include <winnt.h>
> #undef HANDLE
>
The problem with the current implemantation is, that there is no way to hide the
HANDLE definition and I can't see why an implementation in the following manner
winnt.h
#ifndef DONT_DEFINE_HANDLE
typedef void * HANDLE
#endif
makes such big problems as Danny stated.
It is compatible to the current header, but pave the way for an official qt/x11
release (or do you expect that trolltech would change their definitions of the
x11 HANDLE type only based on the fact that this is a precedent ?)
> Another thing I have to wonder is why you are using a mixture of the
> Windows API and the X API rather than X + cygwin. That seems strange,
> too.
Chris January has told some issue of this, another topics are performance
(using native FindFirstFile/FindNextfile instead of cygwin's opendir/readdir)
and missing dns code (fortunately the qt x11 release contains already code for
accessing native win32 dns code)
I hear you saying, that this would not be the right way to do things, it would
be better to optimize the cygwin dll or to add needed functions, but
unfortunally I haven't the knowledge for doing so and I could only deal with
what I have and that is the way to use function which are available.
Okay, in the abstract there is a way to change the qt sources to use void *, but
this produces incompatible qt libraries (because of the c++ abi) and this
implicate a recompile of all available kde 2 packages, which result in much
support traffic like "why does my kde package can't load the qt dll" and for
this I have no additional time, sorry.
Any comments ?