From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6758 Path: news.gmane.org!not-for-mail From: Richard Gorton Newsgroups: gmane.linux.lib.musl.general Subject: Re: the case for __MUSL__ Date: Mon, 29 Dec 2014 12:51:01 -0500 Message-ID: <0E7DD0A2-5CD3-4695-AE48-3C95E6FB195B@cognitive-electronics.com> References: <20141229173713.GM4574@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1419875482 22158 80.91.229.3 (29 Dec 2014 17:51:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2014 17:51:22 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6771-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 29 18:51:16 2014 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Y5eTL-0001Wp-3X for gllmg-musl@m.gmane.org; Mon, 29 Dec 2014 18:51:15 +0100 Original-Received: (qmail 3337 invoked by uid 550); 29 Dec 2014 17:51:13 -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 3329 invoked from network); 29 Dec 2014 17:51:13 -0000 In-Reply-To: <20141229173713.GM4574@brightrain.aerifal.cx> X-Mailer: Apple Mail (2.1510) Xref: news.gmane.org gmane.linux.lib.musl.general:6758 Archived-At: That is a single example of some of the code in a library which is NOT = musl. There are other places in the example library which know about __APPLE__ = or __GLIBC__ or __sun__ My thought is to use __MUSL__ in those libraries as appropriate in place = of ____ as the backing libc is musl. And said use of __MUSL__ is what I am interested in feedback about. Regards, Richard Gorton rcgorton@cog-e.com On Dec 29, 2014, at 12:37 PM, Rich Felker wrote: > On Mon, Dec 29, 2014 at 11:17:55AM -0600, Josiah Worcester wrote: >> On Dec 29, 2014 11:15 AM, "Josiah Worcester" = wrote: >>> I suspect the thing to do here is more to iterate over the set of = chars >> and construct the table as needed: there's no sensible interface to = this >> bit of functionality in a standard way (and musl to my knowledge = doesn't >> have the table you want exposed anywhere). Note that doing it that = way >> ought to just work anywhere. >>=20 >> Minor correction: the table is exposed via __ctype_b_loc which you = were >> using. :) >=20 > This is not a public interface for musl. The macros needed to > interpret the table are not in any public headers, and the table > contents cannot change in any locale-specific manner. The only purpose > of these tables is for ABI compatibility with glibc-linked binaries. > When building against musl, applications should ue the portable > standard ctype.h functions/macros (and the portable table building > approach you suggested if they need tables) rather than hacking in > access to the ABI-compat tables. Future versions of musl may have an > option for omitting all glibc ABI-compat bloat for users not needing > it. >=20 > Rich