From owner-freebsd-hackers Mon Nov 6 01:17:38 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA15970 for hackers-outgoing; Mon, 6 Nov 1995 01:17:38 -0800 Received: from cls.net (freeside.cls.de [192.129.50.1]) by freefall.freebsd.org (8.6.12/8.6.6) with SMTP id BAA15965 for ; Mon, 6 Nov 1995 01:17:34 -0800 Received: by mail.cls.net (Smail3.1.28.1) from allegro.lemis.de (192.109.197.134) with smtp id ; Mon, 6 Nov 95 09:17 GMT From: grog@lemis.de (Greg Lehey) Organisation: LEMIS, Schellnhausen 2, 36325 Feldatal, Germany Phone: +49-6637-919123 Fax: +49-6637-919122 Reply-To: grog@lemis.de (Greg Lehey) Received: (grog@localhost) by allegro.lemis.de (8.6.9/8.6.9) id KAA02745; Mon, 6 Nov 1995 10:12:41 +0100 Message-Id: <199511060912.KAA02745@allegro.lemis.de> Subject: Re: RPC oddities To: joerg_wunsch@uriah.heep.sax.de Date: Mon, 6 Nov 1995 10:12:41 +0100 (MET) Cc: hackers@freebsd.org (FreeBSD Hackers) In-Reply-To: <199511051709.SAA00830@uriah.heep.sax.de> from "J Wunsch" at Nov 5, 95 06:09:00 pm X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1386 Sender: owner-hackers@freebsd.org Precedence: bulk J Wunsch writes: > > As Greg Lehey wrote: > > > > > includes definitions for several constants that are inside > > > enum's. To the contrary, #define's just the very same > > > constants. The result is that the compiler sees something like: > > > How about a series of: > > > > /* Authentication failures */ > > #undef AUTH_BADCRED 1 > > #undef AUTH_REJECTCRED 2 > > #undef AUTH_BADVERF 3 > > #undef AUTH_REJECTVERF 4 > > #undef AUTH_TOOWEAK 5 /* Give em wheaties */ > > Yikes! That's exactly what i'm doing now. But this is a first class > mess. Leave alone the poor appearance of the source code, but it does > also make me nervous that the enum's and the #define's sometimes even > disagree in their values! That was my second suggestion: #ifdef AUTH_BADCRED # if AUTH_BADCRED != 1 # error incorrect redefinition of AUTH_BADCRED #endif #undef AUTH_BADCRED #endif etc. > Somethin's stinkin' badly here! Well, it's not good, but it happens all over the place. Remember that enums are very recent in terms of acceptance (and the fact that they have global scope just makes things worse). The real problem is that the way system header files are made is in itself a complete mess. > (I was in hope for the NFS wizards to shed some light on this.) I'd be interested to see any good replies. I don't think that this is an NFS problem. Greg