Date: Sun, 15 Oct 1995 19:52:54 +1000 From: Bruce Evans <bde@zeta.org.au> To: freebsd-hackers@freebsd.org, j@uriah.heep.sax.de Cc: davidg@freebsd.org, dyson@freebsd.org Subject: Re: lint Message-ID: <199510150952.TAA13687@godzilla.zeta.org.au>
next in thread | raw e-mail | index | archive | help
>The first thing is what i did. I've tossed all the header file >#includes and the external declarations out of those files into a >single source, and ran it through lint. I've only been using those >files that declare external symbols, and in case of the sys/ directory >only those that declare things for the !KERNEL case. (List of broken >sys/ header files: lodef.h, device.h, rlist.h, systm.h, tprintf.h -- >all their function declarations should be #ifdef'ed for KERNEL.) This >should ideally yield the interface declarations for libc. lodef.h seems to be a misspelling. device.h has never really been used. Machine-dependent stuff in isa_device.h and stuff in devconf.h is used instead. device.h is included in only two places in the kernel: - in init_main.c where it isn't used - in si.c where it is used to waste some space in struct si_softc and to print the wrong unit number in an error message. rlist.h is broken. systm.h is only supposed to be included in the kernel. tprintf.h seems pointless. It only declares a couple of printf-like functions and is only included once in the kernel. >Not all of our headers are already self-contained. I need the >following list of ``prerequisite headers'': >#include <sys/types.h> >#include <sys/param.h> >#include <sys/time.h> >#include <netinet/in.h> >#include <arpa/nameser.h> >#include <rpc/types.h> >#include <rpc/xdr.h> >Failing to declare them on top will cause several headers to fall >over. >The rpc/ case is the most iffiest: exactly _this_ sequence is needed, The 4.4lite2 style guide says to include only one of param.h and types.h. I found another unobvious prerequisite: <nfs/rpcv2.h> must be included before <nfs/nfs.h>. This is probably a bug in the nfsv3 code. <nfs/nfs.h> used to be self contained, and lsof expects it to be self-contained. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510150952.TAA13687>