*BSD News Article 13033


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!wupost!uunet!emba-news.uvm.edu!sadye.emba.uvm.edu!wollman
From: wollman@sadye.emba.uvm.edu (Garrett Wollman)
Subject: ANSIfied /sys/sys headers now available...
Message-ID: <1993Mar19.235307.1321@uvm.edu>
Sender: news@uvm.edu
Organization: University of Vermont, EMBA Computer Facility
Date: Fri, 19 Mar 1993 23:53:07 GMT
Lines: 76

I have placed an archive of my version of /sys/sys/*.h on
tsornin.emba.uvm.edu for anonymous FTP, in the directory
/386BSD/ansi-sys-hdrs.tar.Z.  This includes all headers, even the ones
I haven't modified---or the ones I've modified for unrelated purposes.
(Caveat emptor...)  As a result, not all of them will follow the rules
that I set out for myself in the README file.  They are placed in the
tar file in the order that I copied them, so the ones that I'm surest
about are earlier (i.e., before the README file).

I expect to do the same thing for /sys/vm and /sys/i386 at some point
in time.  All developers are welcome to use these files as they wish.

Here is the README file:
------------------------------------
The files in this directory are the results of my efforts at
prototyping everything in 386BSD's /sys/sys directory.  VM
declarations are not included here, as I am not finished with the VM
system yet.  As a free bonus, I have included a copy of my vfs_conf.c,
used for installable file systems; there is other code which also
needs to be modified to make this work.  If you don't choose to use
this, you will have to make some changes in /sys/sys/mount.h.

I have established the following general rules:

ALL kernel code MUST include systm.h.
ALL header files SHOULD be idempotent.

Currently, systm.h includes types.h.  I think it should probably also
include param.h and proc.h as well, at a minimum, but have not made
this change yet.

WARNING
!!!!!!!

If you install these header files, your kernel WILL NO LONGER COMPILE!
It has taken me about ten to twenty hours of work to make it compile
again; most of this is ensuring that functions which don't return a
useful value are properly declared.  Note also that functions which
take a dev_t argument will have to be fixed more extensively:

int myfun(dev)
	dev_t dev;

must be turned into

#ifdef __STDC__
int myfun(dev_t dev)
#else
int myfun(dev)
	dev_t dev;
#endif

in order for compilation to proceed.  (Were it not too difficult to
change, dev_t really ought to be widened to a sensible size.)
Finally, functions which are called as timeouts must be modified to
either take a caddr_t as an argument, which I have done in some cases,
or related calls to timeout() and untimeout() must have the proper
(timeout_t) cast inserted.

In the future, I will make available better headers for the VM system
and machine-dependent code.  My multicasting code already contains
ANSIfied headers for much of the networking system.  As disk space is
available to me, I may provide differences to the source code.

Garrett A. Wollman at tsornin.emba.uvm.edu, 19 March 1993
<Garrett.Wollman@UVM.EDU>
uvm-gen!wollman

------------------------------------
-GAWollman

-- 
Garrett A. Wollman   | Shashish is simple, it's discreet, it's brief. ... 
wollman@emba.uvm.edu | Shashish is the bonding of hearts in spite of distance.
uvm-gen!wollman      | It is a bond more powerful than absence.  We like people
UVM disagrees.       | who like Shashish.  - Claude McKenzie + Florent Vollant