Subject: Re: _KERNEL cpp symbol in kernel source
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: None <nigel@ind.tansu.com.au>
List: port-mac68k
Date: 07/22/1999 11:29:20
> > 1) Files that have variables declared locally that should be externs:
> >    * arch/mac68k/pmap.h      - line 170 (you already found this)
> >    * miscfs/specfs/specdev.h - line 74
> >    * sys/buf.h               - lines 154-158
> >    * sys/namei.h             - line 176
> >    * sys/proc.h              - lines 309,319,320
> >    * sys/vmmeter.h           - line 60
> >    * sys/vnode.h             - line 357
> >    * vm/vm_object.h          - lines 127-129,131-133,136,137
> >    * Both vfs_cache.c and ufs_lookup.c define nchstats.
> 
> Before zapping these, ask on tech-kern. Because you'll have to include the
> static definition somewhere. :-)

	I imagine the best place to define statics that the kernel
needs would be somewhere in kern !

( init_main.c or maybe a new file globals.c/h )


> > 2) Files that include "opt_blah.h" style files unconditionally:
> >    (From my understanding, these should have something like
...
> > 	#if defined(_KERNEL) && !defined(_LKM)
> > 	#endif
> >     around them)
> 
> The current policy is that _headder_ files need the conditionalization.

	I guess that is fair enough, except that I am trying to create
a library for the FS code. These files, in particular, are the problem:

...
> >    * ufs/{ufs_inode.c,ufs_vfsops.c,ufs_vnops.c}
> > 
> >    * vfs/{vfs_lookup.c,vfs_subr.c,vfs_syscalls.c}

-- 
| Nigel Pearson, nigel@ind.tansu.com.au | "reality  is  that  which  |
|  Telstra IN&IND, Sydney, Australia.   |  doesn't go away when you  |
| Office: 9206 3468    Fax:  9212 6329  |  stop  believing  in  it." |
| Mobile: 0408 664435  Home: 9579 3293  |       Philip K. Dick       |