From owner-freebsd-hackers Sat Nov 4 11:18:08 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id LAA19491 for hackers-outgoing; Sat, 4 Nov 1995 11:18:08 -0800 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id LAA19469 for ; Sat, 4 Nov 1995 11:18:02 -0800 Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id UAA02015 for ; Sat, 4 Nov 1995 20:17:52 +0100 Received: by sax.sax.de (8.6.11/8.6.12-s1) with UUCP id UAA05620 for freebsd-hackers@freebsd.org; Sat, 4 Nov 1995 20:17:52 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) id TAA02527 for freebsd-hackers@freebsd.org; Sat, 4 Nov 1995 19:21:07 +0100 From: J Wunsch Message-Id: <199511041821.TAA02527@uriah.heep.sax.de> Subject: RPC oddities To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Sat, 4 Nov 1995 19:21:06 +0100 (MET) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1910 Sender: owner-hackers@freebsd.org Precedence: bulk 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: enum auth_stat { AUTH_OK=0, 1 =1, AUTH_REJECTEDCRED=2, 3 =3, AUTH_REJECTEDVERF=4, 5 =5, AUTH_INVALIDRESP=6, AUTH_FAILED=7 }; or even worse: enum clnt_stat { RPC_SUCCESS=0, RPC_CANTENCODEARGS=1, RPC_CANTDECODERES=2, RPC_CANTSEND=3, RPC_CANTRECV=4, RPC_TIMEDOUT=5, RPC_VERSMISMATCH=6, RPC_AUTHERROR=7, 1 =8, RPC_PROGVERSMISMATCH=9, 3 =10, ... }; What would be the correct way to resolve the conflicts? The number of prerequisites to succesfully #include is ridiculous. nfsd.c uses for example: #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef ISO #include #endif #include #include #include I have yet to find which of them could be omitted; but it seems that at least half a dozen of headers will remain in the list. :-( -- 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. ;-)