From owner-freebsd-arch@FreeBSD.ORG Wed Feb 27 05:50:12 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F1AFD1065670 for ; Wed, 27 Feb 2008 05:50:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 702B413C455 for ; Wed, 27 Feb 2008 05:50:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8s) with ESMTP id 233535368-1834499 for multiple; Wed, 27 Feb 2008 00:31:57 -0500 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.2/8.14.2) with ESMTP id m1R5XcGq026631; Wed, 27 Feb 2008 00:33:40 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-arch@freebsd.org Date: Wed, 27 Feb 2008 00:31:59 -0500 User-Agent: KMail/1.9.7 References: <200802262251.m1QMp7bV021709@hergotha.csail.mit.edu> <200802270514.m1R5ExDe024046@hergotha.csail.mit.edu> In-Reply-To: <200802270514.m1R5ExDe024046@hergotha.csail.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802270031.59797.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Wed, 27 Feb 2008 00:33:41 -0500 (EST) X-Virus-Scanned: ClamAV 0.91.2/6006/Tue Feb 26 20:03:40 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: deischen@freebsd.org, Garrett Wollman Subject: Re: Cleaning up FILE in stdio.. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 05:50:13 -0000 On Wednesday 27 February 2008 12:14:59 am Garrett Wollman wrote: > In article , > Daniel Eischen writes: > >> [I wrote:] > >> I think you have the right idea but this will break the ABI in a way > >> that can't be fudged with symbol versioning. > > > >Well, you can if you add compat symbols for all functions with FILE > >as an argument. > > In every library, including hundreds of third-party libraries that > pass FILE * arguments? I don't think so. > > What would work, although it would be extra pain, would be to extend > the structure. It would be necessary to keep compatibility members of > the structure, in their old locations, and update them to reflect > state changes appropriately. If the only thing that will change is > the width of _file, then that's probably a workable approach, since it > doesn't break anything that wasn't already broken in the presence of > FD 65536 anyway. Applications aren't permitted to store objects of > type FILE, only FILE *, so this should be safe. Actually FD 32768. 32768 gets sign extended when the short is promoted to an int. I guess we could add a _nfile that is an int, and try to keep _file up to date for older apps. Newer apps would just always use _nfile. (Or better, rename _file to _ofile and make the new one _file but at new location). I'll work on that next then. -- John Baldwin