From owner-freebsd-arch@FreeBSD.ORG Wed Feb 27 14:42:22 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 D8FC11065676 for ; Wed, 27 Feb 2008 14:42:22 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id AA0AF8FC13 for ; Wed, 27 Feb 2008 14:42:17 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.2/8.14.2) with ESMTP id m1REh3Sw080116; Wed, 27 Feb 2008 09:43:03 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.2/8.14.2/Submit) id m1REh3Oc080115; Wed, 27 Feb 2008 09:43:03 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Wed, 27 Feb 2008 09:43:03 -0500 From: David Schultz To: John Baldwin Message-ID: <20080227144303.GA79999@zim.MIT.EDU> Mail-Followup-To: John Baldwin , Garrett Wollman , arch@FreeBSD.ORG References: <200802262251.m1QMp7bV021709@hergotha.csail.mit.edu> <200802262355.16519.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200802262355.16519.jhb@freebsd.org> 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 14:42:22 -0000 On Tue, Feb 26, 2008, John Baldwin 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. [...] > However, I can't fix the fact that our stdio can't handle fd's > SHRT_MAX > (again, glibc handles this just fine) w/o making a royal mess. We could > create a new versioned FILE struct (so long as we can recognize the existing > FILE struct somehow) and have new fopen()/fdopen()/freopen() symbols that > return the new struct but then all the stdio routines would have to check to > see if the structure was an old structure explicitly and handle it > appropriately if so. Rather gross. Symbol versioning also doesn't help the case where a FILE * gets passed from an app that's using the new symbol to another library that's using the old symbol, or vise versa. If you do wind up breaking the ABI again, maybe it's worth it to add an explicit version number in the FILE struct itself, so we never have to worry about this again.