[Ekiga-devel-list] Cleaning our config.h's situation



Hi,

Problems :
(1) we don't include config.h everywhere, which limits its usefulness;
(2) we don't seem to have a 100% clear policy of where we should include it from : it is for example included in both ekiga.h and ekiga.cpp, while other places include it from their .cpp directly; (3) the configure.ac does things about gtk-debug which should probably belong to the "DEBUG support" section ; and it does things poorly by putting directly things with -D in the flags -- it probably should do some AC_DEFINE magic so it appears in config.h (which brings us to point (1)).

Solutions :
(1) remove and add #include "config.h" according to point (2) below ;
(2) fix a policy ; I propose to choose from two of them :
(i) include in all header files, as first non-comment and non-empty line ; (ii) include in all source files, as first non-comment and non-empty line. (3) modify the order and use AC_DEFINE instead of flags voodoo in configure.ac.

 I would push for policy (i) for two reasons :
- if for some reason we would like config.h to have an effect on header files, then it should appear there ;
- sometimes the header is the implementation!

Comments welcome, help even more so!

Snark

PS: The commands :
find . -name "*.c*" -exec grep \{\} -e "^#include \"config.h\"" -l \;
find . -name "*.h" -exec grep \{\} -e "^#include \"config.h\"" -l \;

will be pretty useful to find the files which currently do include, to check if they either shouldn't or should sooner; and the same commands with a '-v' added to grep's switches will later allow spotting the files which should do the #include but don't.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]