From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6755 Path: news.gmane.org!not-for-mail From: Josiah Worcester Newsgroups: gmane.linux.lib.musl.general Subject: Re: the case for __MUSL__ Date: Mon, 29 Dec 2014 11:15:16 -0600 Message-ID: References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c26e5ca9b511050b5e0467 X-Trace: ger.gmane.org 1419873335 21270 80.91.229.3 (29 Dec 2014 17:15:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Dec 2014 17:15:35 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6768-gllmg-musl=m.gmane.org@lists.openwall.com Mon Dec 29 18:15:30 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 1Y5duj-0008U8-MY for gllmg-musl@m.gmane.org; Mon, 29 Dec 2014 18:15:29 +0100 Original-Received: (qmail 13312 invoked by uid 550); 29 Dec 2014 17:15:28 -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 12277 invoked from network); 29 Dec 2014 17:15:28 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=OnT768rAFQH+i4jPwKgIEzti8YGFatKzVVQUl9jQJQA=; b=AGGclQoNO/K5SOTb/Pl3tPznXEKfnzy4Q/R5g3tfMLoRPJoEyBv6CZEjS6HOMMm/82 c55ZHxmRONilm3C0ta7WR7/QcrN5tSyQTeOTj7vZbFvoCXch4BhX/lZqQtUElngJsHNr FJW4wD5FP5GxhMobF4VQSSLjGw6FWff2O9Ecw9QKuvVvZi6Kopx6lntModuzWv3ni9Vc A9rPC5lqol0/vEHAiF9x8RZqMeX6EZdh3Qi23w4PNkFcLkrqJl0YF90jtOcCZqM/8sQk Fj/1p6knc4GYUvVw0cpL8l8ClYJHXNVyA3AWtn6Mm5ICBo4Z1NucDUUWQa2q5W9ajiJc EVmg== X-Received: by 10.181.29.170 with SMTP id jx10mr84354990wid.50.1419873316587; Mon, 29 Dec 2014 09:15:16 -0800 (PST) In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:6755 Archived-At: --001a11c26e5ca9b511050b5e0467 Content-Type: text/plain; charset=UTF-8 On Dec 29, 2014 10:27 AM, "Richard Gorton" < rcgorton@cognitive-electronics.com> wrote: > > > Hi, > > I'm working on getting C++ working for our target: we use clang, and libcxx/libcxxabi libraries from llvm.org > it seems to me (as I'm doing this) that instead of doing things like > > // Our compiler defines __COGNITIVE__ > #if defined(__COGNITIVE__) > > It would make more sense to use > > #if defined(__MUSL__) > > > I'm not proposing/suggesting use of this within musl itself, but for use in other libraries (such as libcxx) which 'know' about the internal implementation of libc. > Thoughts & Comments appreciated > > > > An example case is in libcxx/src/locale.cpp, where there are bits of code related to accessing the current locale: > 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. --001a11c26e5ca9b511050b5e0467 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Dec 29, 2014 10:27 AM, "Richard Gorton" <rcgorton@cognitive-elect= ronics.com> wrote:
>
>
> Hi,
>
> I'm working on getting C++ working for our target: we use clang, a= nd libcxx/libcxxabi libraries from llvm.org=
> it seems to me (as I'm doing this) that instead of doing things li= ke
>
> // Our compiler defines __COGNITIVE__
> #if defined(__COGNITIVE__)
>
> It would make more sense to use
>
> #if defined(__MUSL__)
>
>
> I'm not proposing/suggesting use of this within musl itself, but f= or use in other libraries (such as libcxx) which 'know' about the i= nternal implementation of libc.
> Thoughts & Comments appreciated
>
>
>
> An example case is in libcxx/src/locale.cpp, where there are bits of c= ode related to accessing the current locale:
>
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 b= it 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 oug= ht to just work anywhere.

--001a11c26e5ca9b511050b5e0467--