From owner-freebsd-ports Wed Mar 20 11:36:26 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id LAA26659 for ports-outgoing; Wed, 20 Mar 1996 11:36:26 -0800 (PST) Received: from news1.gtn.com (news1.gtn.com [192.109.159.3]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id LAA26651 for ; Wed, 20 Mar 1996 11:36:23 -0800 (PST) Received: (from uucp@localhost) by news1.gtn.com (8.7.2/8.7.2) id UAA07022; Wed, 20 Mar 1996 20:15:30 +0100 (MET) Received: from knobel.gun.de (localhost [127.0.0.1]) by knobel.gun.de (8.7.5/8.7.3) with SMTP id UAA06310; Wed, 20 Mar 1996 20:14:11 +0100 (MET) Date: Wed, 20 Mar 1996 20:14:10 +0100 (MET) From: Andreas Klemm To: J Wunsch cc: Lars_Koeller@odie.physik2.uni-rostock.de, ports@FreeBSD.ORG Subject: Re: xperfmon doesn't compile on FreeBSD-current (incl. PATCH) In-Reply-To: <199603201830.TAA09103@uriah.heep.sax.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Wed, 20 Mar 1996, J Wunsch wrote: > As Andreas Klemm wrote: > > > size = sizeof(nfsstats); > > +#ifdef HAS_CTL_VFS > > + mib[0] = CTL_VFS; > > +#else > > mib[0] = CTL_FS; > > +#endif > > I assume ``CTL_VFS'' is already a #define. In this case, why not > simply do: > > #ifndef HAS_CTL_VFS > # define HAS_CTL_VFS HAS_CTL_FS > #endif That's surely another way to do it. But then one should add a comment, so thats evident for everyone, that this is a FreeBSD - or should I better say BSD 4.4 lite or even an NFS 3.0 code - related hack ? My intention defining HAS_CTL_VFS at that point, where the exact release of FreeBSD already was fiddled out, was to show, that this define is only true under -current. An alternative would be to take your shorter one, Joerg and to add a comment. I like well documented programs ;-) Andreas /// -- andreas@knobel.gun.de /\/\___ Wiechers & Partner Datentechnik GmbH Andreas Klemm ___/\/\/ $$ Support Unix - aklemm@wup.de $$ pgp p-key http://www-swiss.ai.mit.edu/~bal/pks-toplev.html >>> powered by <<< ftp://sunsite.unc.edu/pub/Linux/system/Printing/aps-491.tgz >>> FreeBSD <<< "Ich bleibe bei der Aussage und trotze den Flames. :-)" Ulli Horlacher 02/96