Re: [PATCH] Unconditionally declare strsignal

Christian Biesinger via Newlib <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAPTJ0XEzH-RkCJGr-kb-R1+Aq1J+qq9dA6QquFMXaXGK1-SV=Q@mail.gmail.com>
On Tue, Oct 26, 2021 at 3:48 PM Corinna Vinschen <[email protected]> wrote:
>
> On Oct 26 15:35, Christian Biesinger via Newlib wrote:
> > Ping?
> >
> > On Fri, Oct 8, 2021 at 3:46 PM Christian Biesinger
> > <[email protected]> wrote:
> > >
> > > Currently, newlib does not declare strsignal if DEFS_H is defined,
> > > ostensibly to work around a gdb bug. However, gdb itself compiles
> > > even with this ifndef removed, and this makes sim (another part of
> > > gdb) fail to compile.
> > >
> > > Since it is not clear exactly what issue this was working around,
> > > this patch just removes that ifndef.
> > > ---
> > >  newlib/libc/include/string.h | 2 --
> > >  1 file changed, 2 deletions(-)
> > >
> > > diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
> > > index 60e837bc0..ec74b10d5 100644
> > > --- a/newlib/libc/include/string.h
> > > +++ b/newlib/libc/include/string.h
> > > @@ -130,9 +130,7 @@ char        *strlwr (char *);
> > >  char   *strupr (char *);
> > >  #endif
> > >
> > > -#ifndef DEFS_H /* Kludge to work around problem compiling in gdb */
>
> The correct feature check for strsignal is
>
>   #if __POSIX_VISIBLE >= 200809
>
> Do you want to fix that in your patch?

Done, though that seems a little riskier since that means strsignal is
no longer defined in some cases.

If the new patch looks good to you could you push it? I don't have
write access to newlib.

Thanks,
Christian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.