Re: stdatomic.h uses undefined type (___wchar_t)
Jeff Johnston <[email protected]> Tue, 9 Jun 2026 16:07:46 -0400
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <CAOox84upaN3TA1g40kwC40-0to3H99Fjj4Vb4zzwiOW5JVNL3A@mail.gmail.com> |
--000000000000e932e40653d7aecb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I think that is reasonable. I have pushed a patch. -- Jeff J. On Tue, Jun 2, 2026 at 10:25=E2=80=AFAM Maxim Solodovnik <solomax666@gmail.= com> wrote: > Maybe following simple patch can be applied? :) > > diff --git a/newlib/libc/include/stdatomic.h > b/newlib/libc/include/stdatomic.h > index 67107f47e..40f2d269c 100644 > --- a/newlib/libc/include/stdatomic.h > +++ b/newlib/libc/include/stdatomic.h > @@ -207,7 +207,7 @@ typedef _Atomic(unsigned char) > atomic_char8_t; > #endif > typedef _Atomic(__char16_t) atomic_char16_t; > typedef _Atomic(__char32_t) atomic_char32_t; > -typedef _Atomic(___wchar_t) atomic_wchar_t; > +typedef _Atomic(__wchar_t) atomic_wchar_t; > typedef _Atomic(__int_least8_t) atomic_int_least8_t; > typedef _Atomic(__uint_least8_t) atomic_uint_least8_t; > typedef _Atomic(__int_least16_t) atomic_int_least16_t; > > On Sat, 16 May 2026 at 00:18, Daniel Kowalski <[email protected]> > wrote: > > > > Hello, > > > > I have question regarding fairly recent change in newlib's stdatomic.h > (Copied from FreeBSD sources as far as I understand) > > > > Change itself looks good, but one of the types (___wchar_t, with triple > underscore) does not exist anywhere in newlib sources. FreeBSD defines it > in their _types.h header. > > > > Is this simple oversight and extra underscore should be dropped or part > of some larger change that wasn't fully commited and this type is suppose= d > to be defined? > > > > change in question: > > > https://sourceware.org/git/?p=3Dnewlib-cygwin.git;a=3Dblobdiff;f=3Dnewlib= /libc/include/stdatomic.h;h=3D67107f47e6b3807b6c50de9328fce71b87b7b280;hp= =3D204d11133170445ddd48b578a9176852014a3039;hb=3De4fbaa9ea1dcc53afdd6542139= 03e85b186c9220;hpb=3D09e6aec0a0b361f40fc2b528aff8b18cb2a1745a > > > > =EF=BB=BFBest regards/Pozdrawiam > > Daniel Kowalski > > Software Engineer > > N7 Space Sp. z o.o. > > https://n7space.com > > > > https://bootloader.space > > https://canopen.space > > > > > -- > Best regards, > Maxim > > --000000000000e932e40653d7aecb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,= sans-serif">I think that is reasonable.=C2=A0 I have pushed a patch.</div><= div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif"><br></= div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif">-= - Jeff J.</div></div><br><div class=3D"gmail_quote gmail_quote_container"><= div dir=3D"ltr" class=3D"gmail_attr">On Tue, Jun 2, 2026 at 10:25=E2=80=AFA= M Maxim Solodovnik <<a href=3D"mailto:[email protected]">solomax666@g= mail.com</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=3D= "margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-le= ft:1ex">Maybe following simple patch can be applied? :)<br> <br> diff --git a/newlib/libc/include/stdatomic.h b/newlib/libc/include/stdatomi= c.h<br> index 67107f47e..40f2d269c 100644<br> --- a/newlib/libc/include/stdatomic.h<br> +++ b/newlib/libc/include/stdatomic.h<br> @@ -207,7 +207,7 @@ typedef _Atomic(unsigned char)=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 atomic_char8_t;<br> =C2=A0#endif<br> =C2=A0typedef _Atomic(__char16_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = atomic_char16_t;<br> =C2=A0typedef _Atomic(__char32_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = atomic_char32_t;<br> -typedef _Atomic(___wchar_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 atomi= c_wchar_t;<br> +typedef _Atomic(__wchar_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= atomic_wchar_t;<br> =C2=A0typedef _Atomic(__int_least8_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 atomic_int_least8_t;<br> =C2=A0typedef _Atomic(__uint_least8_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0atomic_uin= t_least8_t;<br> =C2=A0typedef _Atomic(__int_least16_t)=C2=A0 =C2=A0 =C2=A0 =C2=A0atomic_int= _least16_t;<br> <br> On Sat, 16 May 2026 at 00:18, Daniel Kowalski <<a href=3D"mailto:dkowals= [email protected]" target=3D"_blank">[email protected]</a>> wrote:<br> ><br> > Hello,<br> ><br> > I have question regarding fairly recent change in newlib's stdatom= ic.h (Copied from FreeBSD sources as far as I understand)<br> ><br> > Change itself looks good, but one of the types (___wchar_t, with tripl= e underscore) does not exist anywhere in newlib sources. FreeBSD defines it= in their _types.h header.<br> ><br> > Is this simple oversight and extra underscore should be dropped or par= t of some larger change that wasn't fully commited and this type is sup= posed to be defined?<br> ><br> > change in question:<br> > <a href=3D"https://sourceware.org/git/?p=3Dnewlib-cygwin.git;a=3Dblobd= iff;f=3Dnewlib/libc/include/stdatomic.h;h=3D67107f47e6b3807b6c50de9328fce71= b87b7b280;hp=3D204d11133170445ddd48b578a9176852014a3039;hb=3De4fbaa9ea1dcc5= 3afdd654213903e85b186c9220;hpb=3D09e6aec0a0b361f40fc2b528aff8b18cb2a1745a" = rel=3D"noreferrer" target=3D"_blank">https://sourceware.org/git/?p=3Dnewlib= -cygwin.git;a=3Dblobdiff;f=3Dnewlib/libc/include/stdatomic.h;h=3D67107f47e6= b3807b6c50de9328fce71b87b7b280;hp=3D204d11133170445ddd48b578a9176852014a303= 9;hb=3De4fbaa9ea1dcc53afdd654213903e85b186c9220;hpb=3D09e6aec0a0b361f40fc2b= 528aff8b18cb2a1745a</a><br> ><br> > =EF=BB=BFBest regards/Pozdrawiam<br> > Daniel Kowalski<br> > Software Engineer<br> > N7 Space Sp. z o.o.<br> > <a href=3D"https://n7space.com" rel=3D"noreferrer" target=3D"_blank">h= ttps://n7space.com</a><br> ><br> > <a href=3D"https://bootloader.space" rel=3D"noreferrer" target=3D"_bla= nk">https://bootloader.space</a><br> > <a href=3D"https://canopen.space" rel=3D"noreferrer" target=3D"_blank"= >https://canopen.space</a><br> ><br> <br> <br> -- <br> Best regards,<br> Maxim<br> <br> </blockquote></div> --000000000000e932e40653d7aecb--