[PATCH] Unconditionally declare strsignal

Corinna Vinschen vinschen@redhat.com
Tue Oct 26 19:47:53 GMT 2021


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?


Thanks,
Corinna



More information about the Newlib mailing list