Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Feb 1997 17:00:32 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        bde@zeta.org.au, proff@iq.org, hackers@freebsd.org
Subject:   Re: #include dependencies
Message-ID:  <199702020000.RAA06935@phaeton.artisoft.com>
In-Reply-To: <199702010949.UAA17084@godzilla.zeta.org.au> from "Bruce Evans" at Feb 1, 97 08:49:03 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >> Most of the headers are only used in the kernel.  Kernel sources
> 
> >I'm aware of this, this is why you see a number of #ifndef KERNEL.
> 
> #ifndef KERNEL in kernel-only headers is nonsense (unless it is used
> to control a #warning or #error).

Or to prevent a structure definition plus a kvm grovelling library
being misconstrued as an interrface.  8-).

> After living for a while in an environment with sloppy headers,
> programs depend on things like obtaining declarations related to
> ANSI time functions by including <net/if.h>.

I happen to agree with you on this one...

> New interfaces should use sysctl() and be designed better to only
> pass the parts of the kernel struct of interest to applications
> across the interface.

You happen to disagree with you on this one... 8-).  Use of the
"#ifndef" makes sysctl a better bet.  Not using it makes sysctl
a rule which programmers will feel free to ignore.


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702020000.RAA06935>