Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!network.ucsd.edu!dog.ee.lbl.gov!overload.lbl.gov!agate!soda.berkeley.edu!wjolitz From: wjolitz@soda.berkeley.edu (William F. Jolitz) Newsgroups: comp.os.386bsd.misc Subject: Prototypes Date: 14 Jun 1993 17:07:56 GMT Organization: U.C. Berkeley, CS Undergraduate Association Lines: 21 Message-ID: <1vib9c$oe7@agate.berkeley.edu> NNTP-Posting-Host: soda.berkeley.edu This problem is a real bitch. You don't want to have a file that is included by all modules because of the dependancies, and yet you want uniform coverage of all files with system prototypes. In the next release, the way I solved this dillemma was to have a <sys/prototypes.h> file that included all non-subsystem function prototypes, which in turn incorporates "machine/prototypes.h". This file is incorporated in each source module as the last include of each file. I then used GCC 2's function prototype "obssessive compulsive" feature to find all of the missing function prototypes, and to provide the requisite forward dummy structure definitions. It's tedious, but it get's the job done. I found that this was well worth the effort, since function prototypes and a more formal typechecking proceedures caught quite a number of "little" problems. What more can you do here with ANSI C? Bill.