On Thu, 2015-01-29 at 12:12 -0500, Rafael Schloming wrote: > ... > > Hmm, should we consider adding this to our build? I know I've fairly > recently fixed a bunch of bugs where I include a file and it breaks because > it's only ever been included along with some other file that supplied > something it needed.
Generally the way to do this is to make sure that one file (usually the file that implements the functions in the header) includes the header before any other includes. That way if the header does depend on any other headers accidentally then it will error out then. So for example in proton/foo.c there would be: /* License..... */ #include "proton/foo.h" ... Other headers ... Implenetations This should catch most of the headers, but obviously not the ones that don't have a specific implementation c file. Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
