Unconditionally declare strsignal

Message ID 20211008194654.627119-1-cbiesinger@google.com
State New
Headers show
Series
  • Unconditionally declare strsignal
Related show

Commit Message

Christian Biesinger via Newlib Oct. 8, 2021, 7:46 p.m.
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(-)

-- 
2.33.0.882.g93a45727a2-goog

Comments

Mike Frysinger Oct. 9, 2021, 1:15 a.m. | #1
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

Patch

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);