What are the good reasons?
In my own style, every header file is self-contained, #include-ing any other
headers that declare types and macros it mentions. This way people who edit
the top source file are free from worrying about the order of #include-s.
I dislike the idea of a single monolithic header file too, though, for a
different reason: it introduces unneeded dependencies. If you include the
monolithic header in all C files, and then modify _any_ header whatsoever,
everything will be recompiled.
Acutally, that's only true if you generate the dependencies automatically.
If you can keep the details of which source depends on which header and
maintain Makefiles manually you're fine. Still a headache, though.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds