#ifndef's before including the headers (redundant inclusion test?)

Nuno Antunes nuno.antunes at gmail.com
Sun Jun 3 13:19:41 PDT 2007


Hi.

Why is the following test necessary before including headers? (for
example in sys/netgraph/netgraph.h).
#ifndef _SYS_QUEUE_H_
#include <sys/queue.h>
#endif
when <sys/queue.h> already tests for inclusion?

#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_
. ..
#endif
Thanks,
Nuno




More information about the Kernel mailing list