[asterisk-dev] header inclusion policy ?

Kevin P. Fleming kpfleming at digium.com
Thu Mar 23 12:51:08 MST 2006


Luigi Rizzo wrote:

> However, right now we are taking the disadvantages from both
> solution - many files include a large set of system
> headers (not all necessary), and application headers
> (not all necessary), so this is approach (B) without the
> optimization; and even more files rely on nested includes
> from asterisk headers (so its approach (A) without the
> design).

My preference is definitely for (B), with the most optimization
possible, except for compiler/platform-specific stuff... we don't want
#ifdefs in each source file based on the compiler chosen or the OS
platform. Having "asterisk/compiler.h" and "asterisk/platform.h"
included in each file takes care of that, but they should bring in
_only_ the bits needed for those specific things.



More information about the asterisk-dev mailing list