public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Unconditionally declare strsignal
@ 2021-10-08 19:46 Christian Biesinger
  2021-10-09  1:15 ` Mike Frysinger
  2021-10-26 19:35 ` Christian Biesinger
  0 siblings, 2 replies; 7+ messages in thread
From: Christian Biesinger @ 2021-10-08 19:46 UTC (permalink / raw)
  To: newlib; +Cc: vapier, Christian Biesinger

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 */
 char	*strsignal (int __signo);
-#endif
 
 #ifdef __CYGWIN__
 int	strtosigno (const char *__name);
-- 
2.33.0.882.g93a45727a2-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Unconditionally declare strsignal
  2021-10-08 19:46 [PATCH] Unconditionally declare strsignal Christian Biesinger
@ 2021-10-09  1:15 ` Mike Frysinger
  2021-10-26 19:35 ` Christian Biesinger
  1 sibling, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2021-10-09  1:15 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 512 bytes --]

On 08 Oct 2021 15:46, Christian Biesinger 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.

code added over 20 years ago for unclear reason that breaks public header
exports ?  kill it with fire!
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Unconditionally declare strsignal
  2021-10-08 19:46 [PATCH] Unconditionally declare strsignal Christian Biesinger
  2021-10-09  1:15 ` Mike Frysinger
@ 2021-10-26 19:35 ` Christian Biesinger
  2021-10-26 19:47   ` Corinna Vinschen
  1 sibling, 1 reply; 7+ messages in thread
From: Christian Biesinger @ 2021-10-26 19:35 UTC (permalink / raw)
  To: newlib

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 */
>  char   *strsignal (int __signo);
> -#endif
>
>  #ifdef __CYGWIN__
>  int    strtosigno (const char *__name);
> --
> 2.33.0.882.g93a45727a2-goog
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Unconditionally declare strsignal
  2021-10-26 19:35 ` Christian Biesinger
@ 2021-10-26 19:47   ` Corinna Vinschen
  2021-10-27 16:41     ` [PATCH v2] " Christian Biesinger
  2021-10-27 16:42     ` [PATCH] " Christian Biesinger
  0 siblings, 2 replies; 7+ messages in thread
From: Corinna Vinschen @ 2021-10-26 19:47 UTC (permalink / raw)
  To: newlib; +Cc: Christian Biesinger

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] Unconditionally declare strsignal
  2021-10-26 19:47   ` Corinna Vinschen
@ 2021-10-27 16:41     ` Christian Biesinger
  2021-10-27 18:07       ` Corinna Vinschen
  2021-10-27 16:42     ` [PATCH] " Christian Biesinger
  1 sibling, 1 reply; 7+ messages in thread
From: Christian Biesinger @ 2021-10-27 16:41 UTC (permalink / raw)
  To: newlib; +Cc: Christian Biesinger

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 replaces that ifdef with the correct check,
i.e. __POSIX_VISIBLE >= 200809.
---
 newlib/libc/include/string.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
index 60e837bc0..32199c027 100644
--- a/newlib/libc/include/string.h
+++ b/newlib/libc/include/string.h
@@ -130,7 +130,7 @@ char	*strlwr (char *);
 char	*strupr (char *);
 #endif
 
-#ifndef DEFS_H	/* Kludge to work around problem compiling in gdb */
+#if __POSIX_VISIBLE >= 200809
 char	*strsignal (int __signo);
 #endif
 
-- 
2.33.0.1079.g6e70778dc9-goog


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Unconditionally declare strsignal
  2021-10-26 19:47   ` Corinna Vinschen
  2021-10-27 16:41     ` [PATCH v2] " Christian Biesinger
@ 2021-10-27 16:42     ` Christian Biesinger
  1 sibling, 0 replies; 7+ messages in thread
From: Christian Biesinger @ 2021-10-27 16:42 UTC (permalink / raw)
  To: newlib, Christian Biesinger

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] Unconditionally declare strsignal
  2021-10-27 16:41     ` [PATCH v2] " Christian Biesinger
@ 2021-10-27 18:07       ` Corinna Vinschen
  0 siblings, 0 replies; 7+ messages in thread
From: Corinna Vinschen @ 2021-10-27 18:07 UTC (permalink / raw)
  To: newlib; +Cc: Christian Biesinger

On Oct 27 12:41, Christian Biesinger via Newlib 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 replaces that ifdef with the correct check,
> i.e. __POSIX_VISIBLE >= 200809.
> ---
>  newlib/libc/include/string.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libc/include/string.h b/newlib/libc/include/string.h
> index 60e837bc0..32199c027 100644
> --- a/newlib/libc/include/string.h
> +++ b/newlib/libc/include/string.h
> @@ -130,7 +130,7 @@ char	*strlwr (char *);
>  char	*strupr (char *);
>  #endif
>  
> -#ifndef DEFS_H	/* Kludge to work around problem compiling in gdb */
> +#if __POSIX_VISIBLE >= 200809
>  char	*strsignal (int __signo);
>  #endif
>  
> -- 
> 2.33.0.1079.g6e70778dc9-goog

Pushed.


Thanks,
Corinna


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-27 18:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 19:46 [PATCH] Unconditionally declare strsignal Christian Biesinger
2021-10-09  1:15 ` Mike Frysinger
2021-10-26 19:35 ` Christian Biesinger
2021-10-26 19:47   ` Corinna Vinschen
2021-10-27 16:41     ` [PATCH v2] " Christian Biesinger
2021-10-27 18:07       ` Corinna Vinschen
2021-10-27 16:42     ` [PATCH] " Christian Biesinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).