From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19289 invoked from network); 4 Feb 2023 07:08:52 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 4 Feb 2023 07:08:52 -0000 Received: (qmail 3823 invoked by uid 550); 4 Feb 2023 07:08:50 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 3789 invoked from network); 4 Feb 2023 07:08:49 -0000 Mime-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ayaya.dev; s=key1; t=1675494518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GRFisU1Gh1XL0gGOZ3WwJi8E+Taq9H2hIR5mFrUaaZk=; b=Pbo1LFJIFYMBR/KCC3HRFFVGfvq57QMP9Y4/YAyo+vXdjpZWcdi7XbOU3GAX3tOuUyd4OF LJpokGrHqKgSSU6HkG5yobIWL+hy66fPNuFwqMuHf18YeIW5Qse5A8Z3LQRzXnodpwgqQf Z7AJLrRpKcpLzenNQc6TS35C2DMlVNs= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 04 Feb 2023 08:08:36 +0100 Message-Id: Cc: "Peter Collingbourne" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "alice" To: References: <20230204063021.2681891-1-pcc@google.com> In-Reply-To: <20230204063021.2681891-1-pcc@google.com> X-Migadu-Flow: FLOW_OUT Subject: Re: [musl] [PATCH] arm: Use __WCHAR_TYPE__ for wchar_t if defined On Sat Feb 4, 2023 at 7:30 AM CET, Peter Collingbourne wrote: > When building with -fshort-wchar the definition of wchar_t is > incorrect. Get the correct definition from the compiler if available. > > This is useful when reusing the freestanding parts of musl on a > bare-metal target that uses -fshort-wchar. somebody talked about this in 2015, see https://www.openwall.com/lists/musl/2015/02/18/2 for the previous discussion. i understand in this case it's proposed a little different- "reusing freestanding parts" as opposed to building a whole libc.so, but in that case you could most likely patch this in when reusing it standalone on= ly? it doesn't seem a good idea for it to be there, in general. > --- > arch/arm/bits/alltypes.h.in | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/bits/alltypes.h.in b/arch/arm/bits/alltypes.h.in > index d62bd7bd..9596466b 100644 > --- a/arch/arm/bits/alltypes.h.in > +++ b/arch/arm/bits/alltypes.h.in > @@ -12,8 +12,12 @@ > #define __LONG_MAX 0x7fffffffL > =20 > #ifndef __cplusplus > +#ifdef __WCHAR_TYPE__ > +TYPEDEF __WCHAR_TYPE__ wchar_t; > +#else > TYPEDEF unsigned wchar_t; > #endif > +#endif > =20 > TYPEDEF float float_t; > TYPEDEF double double_t; > --=20 > 2.39.1.519.gcb327c4b5f-goog