[asterisk-dev] policy for managing headers

Russell Bryant russell at digium.com
Fri Nov 16 09:14:50 CST 2007


Luigi Rizzo wrote:
> My proposal would be to let asterisk/compat.h deal with at least
> the most common headers, or those that might have platform-specific
> names or locations (most noticeably socket.h and the various
> network-related ones).
> 
> Sources would still include their own "asterisk/somesubsystem.h"
> headers, but at least this should reduce/simplify the management
> of header files and reduce the chance of errors.
> 
> See a partial list below preceded by the number of occurrences in
> the asterisk source tree.   
> 
> Comments/objections ?

I am fine with putting system headers in compat.h that have platform specific
issues to be handled, or are included a large number of times in the tree, like
the ones you pointed out.  You included some asterisk headers in the list,
though.  I'd like to keep forcing all modules to include those.

I don't necessarily want to get carried away and include _everything_ there.  I
think there is some value in knowing which special headers are needed in a file.
 It doesn't make sense to increase the build time for something that is only
needed in just a few files.

-- 
Russell Bryant
Senior Software Engineer
Open Source Team Lead
Digium, Inc.



More information about the asterisk-dev mailing list