[bind10-dev] style for #include <file> versus #include "file"

Jeremy C. Reed jreed at isc.org
Fri Feb 19 20:39:54 UTC 2010


We have a mix of #include <file> versus #include "file". I don't see 
this defined in our CodingGuidelines style guide. I suggest we only use 
quoted "file" if the actual code is within the same individual component 
source tree. The fall back to -I added paths will still work with 
quoted includes but at least you recognize as a code reader quickly that 
the referenced headers are part of this individual component.

Examples of what we have now:

#include "buffer.h"
#include "dns/buffer.h"
#include <dns/buffer.h>

#include "ccsession.h"
#include <config/ccsession.h>

#include "data.h"   -- that is vague
#include <data.h>   -- that is vague
#include <cc/data.h>

#include "message.h"
#include "dns/message.h"
#include <dns/message.h>

#include "messagerenderer.h"
#include "dns/messagerenderer.h"
#include <dns/messagerenderer.h>

#include "name.h"
#include "dns/name.h"
#include <dns/name.h>

#include "rrclass.h"
#include "dns/rrclass.h"
#include <dns/rrclass.h>

#include "dns/rrset.h"
#include <dns/rrset.h>
#include "rrset.h"

#include "rrtype.h"
#include <dns/rrtype.h>
#include "dns/rrtype.h"

#include "exceptions.h"
#include <exceptions/exceptions.h>

#include "module_spec.h"
#include <module_spec.h>
#include <config/module_spec.h>

#include "query.h"
#include <auth/query.h>

#include "question.h"
#include <dns/question.h>

#include "rdata.h"
#include <dns/rdata.h>

#include "rdataclass.h"
#include <dns/rdataclass.h>


#include "rrttl.h"
#include <dns/rrttl.h>

#include "session.h"
#include <cc/session.h>




More information about the bind10-dev mailing list