[Patch] two patches to compile kdelibs/khtml on windows

Lubos Lunak l.lunak at suse.cz
Mon Dec 5 21:26:43 GMT 2005


Dne pondělí 05 prosinec 2005 21:59 Christian Ehrlicher napsal(a):
> Maks Orlovich schrieb:
> <snip>
>
> >>The scond is a little bit more complicated.
> >>The win32 api sdk also defines some values (OPTIONAL, ABSOLUTE, RELATIVE
> >>and FOCUS_EVENT) and therefore I get compiler errors when an api-header
> >>is included somewhere. So I decided to undef those values in the
> >>specific headers before they get redefined. I have to include windows.h
> >>too to be sure it isn't included after the definition of the problematic
> >>enums.
> >
> > Could you perhaps consider doing something like "fixwin32h.h", similar to
> > the "fixx11h.h", so all the ugliness is localized?
>
> I think this is a good idea but I don't understand why this file
> shouldn't be included into a header ("... put #include <fixx11h.h> in
> the .cpp file (not .h file!) between the place where X11 headers...").
> I have to put fixwinh.h into a header because I get the errors there...
> Also I have to include windows.h because of the reason above.

 The reason is that fixx11h.h alters what's included from previous files and 
so including it from a .h file could affect files where you don't expect 
this. And from looking at your patch I don't see why DOM headers should 
include platform-specific .h files, you should include platform-specific 
headers in platform-specific .cpp files.

 That said, since fixx11h.h says it should be without side effects, including 
such files from headers shouldn't be probably a problem if you really have a 
good reason to do so.

-- 
Lubos Lunak
KDE developer
---------------------------------------------------------------------
SuSE CR, s.r.o.  e-mail: l.lunak at suse.cz , l.lunak at kde.org
Drahobejlova 27  tel: +420 2 9654 2373
190 00 Praha 9   fax: +420 2 9654 2374
Czech Republic   http://www.suse.cz/




More information about the kde-core-devel mailing list