From owner-freebsd-arch@FreeBSD.ORG Wed Feb 27 05:33:43 2008 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76CEF1065673; Wed, 27 Feb 2008 05:33:43 +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 A99E313C442; Wed, 27 Feb 2008 05:33:42 +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 233535366-1834499 for multiple; Wed, 27 Feb 2008 00:31:55 -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 m1R5XcGp026631; Wed, 27 Feb 2008 00:33:38 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Daniel Eischen Date: Wed, 27 Feb 2008 00:27:05 -0500 User-Agent: KMail/1.9.7 References: <200802262251.m1QMp7bV021709@hergotha.csail.mit.edu> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802270027.05426.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:38 -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: arch@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:33:43 -0000 On Tuesday 26 February 2008 11:58:55 pm Daniel Eischen wrote: > On Tue, 26 Feb 2008, Garrett Wollman wrote: > > > In article <200802261524.30384.jhb@FreeBSD.org> you write: > > > >> This is assuming that the contents and layout of FILE are not a > >> public ABI (i.e. we malloc the things internally and consumers should > >> just treat the pointer value as a cookie and not grub around in the > >> internals). > > > > Most interpreted languages grub around in the internals, as > > (historically) do a number of macros. Historically Emacs > > did so as well (I suppose you can call it an interpreted language). > > Yech. I also forgot about the macros in , like __sfeof() > and friends. > > >> Comments? > > > > 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. You have to worry about other libraries (say ncurses) that use fopen@1.0 and then return that FILE * to a user app that calls fclose (but the user app will call fclose@1.1 and it blows up). Hence in my other e-mail where I said all the stdio routines would have to detect the two different versions and handle them. Gross. > I'd like us to say that the innards of FILE are not part of our > ABI, but we would still have to do something to keep at least > enough of the ABI for any macros. The problem is that _file is used by fileno() via __sfile() and that's the one I want to fix. The sFILEX stuff is ok as none of it is exposed, but not fixing __file. -- John Baldwin