From owner-freebsd-hackers Sun Dec 14 10:21:43 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA25089 for hackers-outgoing; Sun, 14 Dec 1997 10:21:43 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA25078 for ; Sun, 14 Dec 1997 10:21:36 -0800 (PST) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.8.8/8.8.8) with UUCP id TAA08412 for freebsd-hackers@freebsd.org; Sun, 14 Dec 1997 19:21:34 +0100 (CET) (envelope-from j@uriah.heep.sax.de) Received: (from j@localhost) by uriah.heep.sax.de (8.8.8/8.8.5) id TAA29536; Sun, 14 Dec 1997 19:16:08 +0100 (MET) Date: Sun, 14 Dec 1997 19:16:08 +0100 (MET) Message-Id: <199712141816.TAA29536@uriah.heep.sax.de> Mime-Version: 1.0 X-Newsreader: knews 0.9.8 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <199712071816.KAA21840@freefall.freebsd.org> <19971208091729.40125@uriah.heep.sax.de> <863ek4p1tx.fsf_-_@bitbox.follo.net> <199712100013.BAA04827@uriah.heep.sax.de> <863ek1xtsl.fsf@bitbox.follo.net> In-Reply-To: <863ek1xtsl.fsf@bitbox.follo.net> From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: New option model (was Re: cvs commit: src/sys/kern kern_exit.c) X-Original-Newsgroups: local.freebsd.hackers To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Eivind Eklund wrote: > As far as I can see, the only correct #ifdef's in the kernel .c files > are #ifdef KERNEL (should be _KERNEL) - everything else should be > #if to allow #define XXX 1 or 0. Am I correct? Should I fix this as > I do my walkthrough anyway? Hmm, not sure. All the boolean current options are #ifdef-evaluated. What do others think about it? I don't see an urgent need to change _this_. Well, if you were going to spell _KERNEL correctly, by all means, go ahead! ;) > For any option that isn't mentioned in a header file, it should be > fairly simple to move to the new model - a bit of work, but mostly > just work, not thought. Yep. Options mentioned in header files are the actual problem. Most of the header files doing so are bogus. I'm not sure what others think about kernel structs that vary their size based on different kernel option usage. IMHO they should die, since they are highly dangerous, and this danger doesn't justify the few saved bytes. >> Except for a few things like #ifdef _KERNEL (still >> misspelled as #ifdef KERNEL in FreeBSD), #ifdef's should be mostly >> banned from .h files. > > These look like a lot of non-trivial work to fix :-( Unfortunately, yes. If people can help fixing them, this would be highly appreciated. -- 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. ;-)