From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6350 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Constants to decode __ctype_b_loc() table Date: Thu, 16 Oct 2014 11:37:58 -0400 Message-ID: <20141016153758.GZ32028@brightrain.aerifal.cx> References: <20141015104142.GA2186@zx-spectrum.accesssoftek.com> <20141015113207.GF4874@port70.net> <20141015120531.GA5017@zx-spectrum.accesssoftek.com> <20141015165136.GS32028@brightrain.aerifal.cx> <20141015191946.GB1552@zx-spectrum.accesssoftek.com> <20141016005842.GT32028@brightrain.aerifal.cx> <20141016015333.GG4874@port70.net> <20141016020712.GV32028@brightrain.aerifal.cx> <20141016083739.GA2525@zx-spectrum.accesssoftek.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1413473898 31217 80.91.229.3 (16 Oct 2014 15:38:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 15:38:18 +0000 (UTC) To: "musl@lists.openwall.com" Original-X-From: musl-return-6363-gllmg-musl=m.gmane.org@lists.openwall.com Thu Oct 16 17:38:11 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Xen7z-0001WQ-IP for gllmg-musl@plane.gmane.org; Thu, 16 Oct 2014 17:38:11 +0200 Original-Received: (qmail 26522 invoked by uid 550); 16 Oct 2014 15:38:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 26514 invoked from network); 16 Oct 2014 15:38:10 -0000 Content-Disposition: inline In-Reply-To: <20141016083739.GA2525@zx-spectrum.accesssoftek.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:6350 Archived-At: On Thu, Oct 16, 2014 at 11:37:39AM +0300, Sergey Dmitrouk wrote: > On Wed, Oct 15, 2014 at 07:07:12PM -0700, Rich Felker wrote: > > In the link you cited: > > > > "This interface is not in the source standard; it is only in the > > binary standard." > > Even if it's a binary interface, it shouldn't be underspecified. Right > now __ctype_b_loc.c contains an array of numbers which correspond to > what glibc has. Consider the following situation: glibc changes masks > at some point, musl doesn't, someone uses masks from new glibc's > headers after reading a thread like this one and obtains broken locales. glibc can't change these because every existing glibc binary using the ctype functions depends on them. They could do it with a new symbol version, but that would be a lot of gratuitous breakage, and if we wanted to support that it would take a lot more hacks than just "updating" our tables. > Having this documented in form of a comment instead of public interface > would be good as well, in this case clients could consult place where > it's documented and be sure that their constants are correct. Say, add > a comment to __ctype_b_loc.c to clarify meaning of the table and > document masks at the same time. The documentation is purely that this object which __ctype_b_loc returns a pointer to is a binary blob matching what glibc provides for the purpose of running glibc-linked binaries. It's not an API interface but an ABI interface. Rich