From owner-freebsd-hackers Sat Feb 1 16:02:31 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id QAA16675 for hackers-outgoing; Sat, 1 Feb 1997 16:02:31 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id QAA16665 for ; Sat, 1 Feb 1997 16:02:28 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA06935; Sat, 1 Feb 1997 17:00:32 -0700 From: Terry Lambert Message-Id: <199702020000.RAA06935@phaeton.artisoft.com> Subject: Re: #include dependencies To: bde@zeta.org.au (Bruce Evans) Date: Sat, 1 Feb 1997 17:00:32 -0700 (MST) Cc: bde@zeta.org.au, proff@iq.org, hackers@freebsd.org In-Reply-To: <199702010949.UAA17084@godzilla.zeta.org.au> from "Bruce Evans" at Feb 1, 97 08:49:03 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >> 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 . 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.