From owner-freebsd-current Sun Dec 21 02:20:41 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id CAA21399 for current-outgoing; Sun, 21 Dec 1997 02:20:41 -0800 (PST) (envelope-from owner-freebsd-current) 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 CAA21382 for ; Sun, 21 Dec 1997 02:20:34 -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 LAA28138 for freebsd-current@freebsd.org; Sun, 21 Dec 1997 11:20:29 +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 LAA00388; Sun, 21 Dec 1997 11:02:36 +0100 (MET) Date: Sun, 21 Dec 1997 11:02:36 +0100 (MET) Message-Id: <199712211002.LAA00388@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: <199712201434.JAA00329@dyson.iquest.net> <14545.882642903@time.cdrom.com> <19971221120534.43478@lemis.com> From: j@uriah.heep.sax.de (J Wunsch) Subject: Re: Bruce vandalism again X-Original-Newsgroups: local.freebsd.current To: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Greg Lehey wrote: > But the question of consistency brings with it the question > of what kind of consistency. Self-consistency, inside one file. > Since ANSI C prototypes enable more > error checking than (voluntary) K&R prototypes, I consider them a Good > Thing. Old-style function declarations weren't called `prototype'. > int ether_ioctl __P((struct ifnet *, int, caddr_t)); > > It's a lot easier to prove consistency if the declaration and > definition use the same kind of prototype. Definitions aren't called prototypes either. It's quite normal that if your definition is old-style, the declaration would still be prototyped on a compiler that defines __STDC__ (via __P()). At least, potential `consumers' of the declaration (those who include the .h file) will see the proper prototype, so they benefit from the typechecking nevertheless, even though the definition is old-style. I think gcc even warns some (all?) possible problems iff the old-style definition is inconsistent with the ANSI prototype (from the .h file). > About the only plausible argument I've seen in favour of the K&R style > is (from Bruce) that it makes importing 4.4BSD Lite 2 easier. The main point is that it makes it easier to find the functional differences when cvs diffing against the vendor branches, or when diffing the files against the Net/OpenBSD versions. We'll need some policy decision that makes it clear when it's OK to move an entire file to ANSI declarations. Mixed declaration styles inside the same file have never been encouraged. -- 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. ;-)