Date: Sun, 15 Oct 1995 08:52:27 +0100 (MET) From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-hackers@FreeBSD.org Cc: davidg@FreeBSD.org (David Greenman), dyson@FreeBSD.org Subject: Re: lint Message-ID: <199510150752.IAA17881@uriah.heep.sax.de> In-Reply-To: <199510142250.IAA28055@godzilla.zeta.org.au> from "Bruce Evans" at Oct 15, 95 08:50:34 am
next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans wrote: > > >The newly-built lint buried another bogon out of the depths of the > >header mishmash: we've got a name clash for struct pmap! David? John? I'm wondering about your opinions about struct pmap... > One way to find more bogons than you want to know about is to include > all headers. Another way is to change all typedefs in headers to ones > that are allowed by standards but weird. Portable applications should > still compile cleanly with maximal warnings enabled. 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. 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, and this is not very obvious. It's not documented in the man pages, unlike the <sys/types.h> that's often mentioned as a prerequisite in many man pages, or <netinet/in.h> and <arpa/nameser.h> that are mentioned in the resolver(3) man page. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510150752.IAA17881>