From owner-freebsd-current Thu Aug 19 8:58:46 1999 Delivered-To: freebsd-current@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 4853C14BFD; Thu, 19 Aug 1999 08:58:39 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id RAA24587; Thu, 19 Aug 1999 17:58:29 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id RAA70837; Thu, 19 Aug 1999 17:58:29 +0200 (MET DST) Date: Thu, 19 Aug 1999 17:58:28 +0200 From: Eivind Eklund To: Peter Wemm Cc: current@FreeBSD.org Subject: NFS HEADS UP (was Re: cvs commit: src/sys/nfs nfsm_subs.h xdr_subs.h) Message-ID: <19990819175828.Q45123@bitbox.follo.net> References: <199908191450.HAA43604@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <199908191450.HAA43604@freefall.freebsd.org>; from Peter Wemm on Thu, Aug 19, 1999 at 07:50:13AM -0700 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Thu, Aug 19, 1999 at 07:50:13AM -0700, Peter Wemm wrote: > peter 1999/08/19 07:50:13 PDT > > Modified files: > sys/nfs nfsm_subs.h xdr_subs.h > Log: > Convert all the nfs macros to do { blah } while (0) to ensure it > works correctly in if/else etc. egcs had probably picked up most of the > problems here before with "ambiguous braces" etc, but this should > increase the robustness a bit. Based on an idea from Eivind Eklund. When I tested this, I got significant binary changes after changing the macros to be . Writing a couple of test programs, I was not able to get binary changes without actual semantic changes - the optimizer optimize away do { ... } while(0); just fine. I didn't have any testbed for NFS, which was why I didn't commit similar changes myself. Interpretation: NFS is likely to be different now than it was before these commits. This hopefully mean less bugs, but we might also have had bugs cancelling each other and 'mystery fixes' that no longer work. If you get strange effects in NFS in the upcoming time, you might try flipping this commit. I still think the change is a good and necessary one. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message