From owner-freebsd-current Thu Nov 7 15:41: 4 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F06637B401 for ; Thu, 7 Nov 2002 15:41:03 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9083743E4A for ; Thu, 7 Nov 2002 15:41:02 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id gA7Nf1pk025599; Thu, 7 Nov 2002 16:41:01 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 07 Nov 2002 16:40:23 -0700 (MST) Message-Id: <20021107.164023.40619416.imp@bsdimp.com> To: tlambert2@mindspring.com Cc: jdp@polstra.com, current@freebsd.org Subject: Re: [PATCH] note the __sF change in src/UPDATING From: "M. Warner Losh" In-Reply-To: <3DCAF889.BCEA341A@mindspring.com> References: <200211071926.gA7JQ5i3065752@vashon.polstra.com> <20021107.145225.104187142.imp@bsdimp.com> <3DCAF889.BCEA341A@mindspring.com> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <3DCAF889.BCEA341A@mindspring.com> Terry Lambert writes: : "M. Warner Losh" wrote: : > Gotcha. I'm thinking very seriously about keeping __sF support (but : > creating no new binaries with it in it) and the freeze on sizeof(FILE) : > through the 5.x series of releases because we botched the : > compatibility stuff so badly to give people a chance to catch their : > breaths before that reorg can happen. : : Redefining stdio as: : : #define stdin (__stdio(0)) : #define stdout (__stdio(1)) : #define stderr (__stdio(2)) : : And then defining an __stdio() function that returns a pointer : to a struct FILE, would let you change the underlying implementation : however you wanted, later, without disrupting newly compiled programs. : : This may not be entirely happy for static declarations: : : FILE *fp = stdin; /* default */ : : ...but that's a compiler problem (I think). That's what __std{in,out,err}p do, and it saves function calls all over the place. This patch just makes -stable more compatible with current. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message