There can be only one! (global.h)

Christian Ehrlicher Ch.Ehrlicher at gmx.de
Mon Mar 6 10:25:35 CET 2006


Von: Thiago Macieira <thiago at kde.org>
> Alexander Neundorf wrote:
> >On Sunday 05 March 2006 14:59, Stephan Kulow wrote:
> >> On Sunday, 5. March 2006 11:46, Peter Kümmel wrote:
> >> > Hi there,
> >> >
> >> > while compiling khtml/kjs with mingw I've met a problem:
> >> >
> >> > There are THREE global.h files,
> >> >
> >> > kio/kio/global.h   <- svn
> >> > kjs/global.h   <- generated by the build process
> >> > kjsembed/kjsembed/global.h  <- svn
> >> >
> >> >
> >> > Because the naming is incorrect, these files are not
> >> > global they are only visible in their "include-space",
> >> > I propose the rename them.
> >>
> >> How so? kio/global.h is always included as such and the same for kjs -
> >> not sure about kjsembed, but it shouldn't matter at all.
> >>
> >> So where is your problem?
> >
> >It works, but it's not nice. I already wanted to write basically the
> > same email. It only works if the include directories are given
> > correctly, otherwise it will include the wrong global.h and the
> > compiler will produce errors, but not that it didn't find the header.
> >
> >I'd suggest to rename them to something like kjs-global.h and
> > kio-global.h . Especially now that we have svn :-)
> 
> While that's a valid suggestion, I don't understand the reason behind it.
> 
> #include <kio/global.h> will never clash with the KJS or KJSEmbed's 
> global.h. If you find somewhere it's doing #include "global.h", it's 
> probably best to change there.
> 
> As for the other two global.h, it should work too. In the future, if we 
> move things around in SVN, we may end up with duplicate names too, so 
> it's important to support that from the start. 
> 
> The include paths are defined per directory, right? So what's the whole 
> problem?
The problem really was '#include "global.h"', but it shouldn't be that hard
to find out all places where this is used.

Christian

-- 
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer


More information about the Kde-buildsystem mailing list