Kai Backman wrote:

>  Ok, my bad Stephan. On second reading my first reply comes across as
> confrontational, I was just making sure this isn't something we -need-
> to do. I had a bit more time to think about this:
> 
> - We can write a script that detects symbol definitions that change
> header files on a global scale. Assuming we can identify these cases,
> is it OK to remove/rewrite them from the codebase. Ie. do we ever
> legitimately need to do the following (that can't be replaced by
> constants and templates):
> 
> sample1.cxx:
> #define FOO
> #include "foo.hxx" // Now foo.hxx behaves in one way
> 
> sample2.cxx:
> #define BAR
> #include "foo.hxx // Now foo.hxx behaves differently
> 
> - We can also run something similar to LXR and try to identify
> potential cases of the problem Stephan shows. Is writing this tool
> worth the trouble?

We have another slightly different case.

sample1.cxx
#define FOO
#include "foo.hxx"

sample2.cxx
#include "foo.hxx"

sample2.cxx
#include "foo.hxx"

etc.

where it is essential that "foo.hxx" is included with "FOO" defined
exactly one time (not more and not less). This is what we are doing with
the "...slots.hxx" files that are generated in the sdi directories of
sfx based modules. We could avoid this by splitting up the generated
header file into two if that helped. Would be some work to do in the
svidl project that most probably I had to do as nobody except me knows
this stuff (a relict from ancient times ;-)).

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to