Subject: opt_*.h vs. _KERNEL_OPT?
To: None <tech-kern@NetBSD.org>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 06/15/2005 02:59:16
After I've added a defflag (for the vnd_with_compression stuff), I 
understand the generated opt_vnd_with_compression file should be included 
at the top of sys/dev/vnd.c.

Now looking at that file, "fs_nfs.h" (which seems to be created the same 
way as the opt_*.h) is surrounded by a #if defined(_KERNEL_OPT).
Looking at sys/dev/md.c and some other files, they all include their 
opt_*.h files without checking _KERNEL_OPT. So:

What is _KERNEL_OPT, and should #includes of opt_*.h files be wrapped in a 
check for it? I.e.

 	#if defined(_KERNEL_OPT)
 	#include "opt_vnd_with_compression.h"
 	#endif

or

 	#include "opt_vnd_with_compression.h"
?


  - Hubert