guards for includes ok?
Poul-Henning Kamp
phk at phk.freebsd.dk
Wed May 20 16:53:53 CEST 2015
--------
In message <555C9496.2090404 at schokola.de>, Nils Goroll writes:
>Does anyone have objections to adding guards (like #ifdef
>VARINSH_CACHE_CACHE_H_INCLUDED) to all our includes? This would make it easier
>for vmod authors because compilers wouldn't barf about double includes.
I had actually thought about doing the opposite: Add a "don't include
this more than once" guard:
#ifdef COMBINER_H_INCLUDED
# error "combiner.h included multiple times"
#endif
#define COMBINER_H_INCLUDED
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the varnish-dev
mailing list