[PATCH] Unconditionally declare strsignal

Christian Biesinger cbiesinger@google.com
Wed Oct 27 16:42:14 GMT 2021


On Tue, Oct 26, 2021 at 3:48 PM Corinna Vinschen <vinschen@redhat.com> wrote:
>
> On Oct 26 15:35, Christian Biesinger via Newlib wrote:
> > Ping?
> >
> > On Fri, Oct 8, 2021 at 3:46 PM Christian Biesinger
> > <cbiesinger@google.com> 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


More information about the Newlib mailing list