From owner-freebsd-current Thu Nov 7 15:37:24 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 4013B37B401 for ; Thu, 7 Nov 2002 15:37:23 -0800 (PST) Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E6CC43E42 for ; Thu, 7 Nov 2002 15:37:22 -0800 (PST) (envelope-from ataraxia@cox.net) Received: from arkadia.nv.cox.net ([68.98.181.29]) by lakemtao02.cox.net (InterMail vM.5.01.04.05 201-253-122-122-105-20011231) with ESMTP id <20021107233722.JQPW12192.lakemtao02.cox.net@arkadia.nv.cox.net>; Thu, 7 Nov 2002 18:37:22 -0500 Received: from arkadia.nv.cox.net (localhost [127.0.0.1]) by arkadia.nv.cox.net (8.12.6/8.12.6) with ESMTP id gA7NbLV3082070; Thu, 7 Nov 2002 18:37:21 -0500 (EST) (envelope-from ataraxia@arkadia.nv.cox.net) Received: (from ataraxia@localhost) by arkadia.nv.cox.net (8.12.6/8.12.6/Submit) id gA7NbK1m082069; Thu, 7 Nov 2002 18:37:20 -0500 (EST) (envelope-from ataraxia) Date: Thu, 7 Nov 2002 18:37:20 -0500 (EST) From: Ray Kohler Message-Id: <200211072337.gA7NbK1m082069@arkadia.nv.cox.net> To: kientzle@acm.org, tlambert2@mindspring.com Subject: Re: [PATCH] note the __sF change in src/UPDATING Cc: current@FreeBSD.ORG In-Reply-To: <3DCAF6C1.D01805FE@mindspring.com> 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 > From owner-freebsd-current@FreeBSD.ORG Thu Nov 7 18:30:04 2002 > Date: Thu, 07 Nov 2002 15:26:57 -0800 > From: Terry Lambert > To: kientzle@acm.org > Cc: current@FreeBSD.ORG > Subject: Re: [PATCH] note the __sF change in src/UPDATING > > > Specifically, I do not buy the idea that there is a necessity > for the existance of data interfaces, as opposed to procedural > interfaces. > > And procedural interfaces are fixable with weak symbols. > > The thing that's screwing us with __sF is that it is a data block > that's directly referenced without the use of an accessor function, > and thefore there are global data references, rather than accessor > or mutator function references. > > As a result, when the underlying data changes, the code that has > already been compiled to reference it, must also change. > > This problem has already been fixed with errno. It has already > been fixed with strerror() (though unfortunately, the sys_errlist[] > and sys_nerr references remain unwrapped). It has been fixed in > many other places (e.g. the curses library used to export row and > column count integers, and doesn't any more). > > It's very obvious to me that defining a *non-inline* function to > return the correct __sF entry by entry ID will erase this problem > for a future version of FreeBSD, while leaving the __sF invisible > for a revision cycle, so that new applications will get the > function reference, and old applications will get the __sF reference > they expect, and continue to compile and link correctly. Hear hear, I agree. There's no need to expose what ought to be "private" data to the world, especially when we can get the additional benefit here of letting us play with the implementation. - @ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message