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

Lubos Lunak l.lunak at suse.cz
Wed Dec 7 13:36:00 GMT 2005


On Tuesday 06 December 2005 06:56, Christian Ehrlicher wrote:
> Lubos Lunak schrieb:
> > Dne pondělí 05 prosinec 2005 21:59 Christian Ehrlicher napsal(a):
> >>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.
>
> Here the fixwinh.h and a patch to include it in the three headers where
> I get compile errors. It should not affect compilation on linux.

 So it really needs to be used in the headers? To give you a slightly better 
idea why I have written in the instructions to include it in .cpp files, 
consider this:
a.cpp:
#define RELATIVE // for debugging, give me relative times
#include "rendering/render_style.h"
// no X11 or windows headers here at all
...
#ifdef RELATIVE
... some debug code here

> // OPTIONAL is defined '#define OPTIONAL' - so what to do here?

 If you don't expect this empty #define will be used anywhere just #undef it, 
otherwise remap it to #define WOPTIONAL (note that even though your comments 
say to use W* the code uses X*).

> What about the other patch? Is it ok (with the change from Thiago
> Macieira)?
>
> Christian

-- 
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