unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] <signal.h>: Make bsd_signal available with _GNU_SOURCE
@ 2022-11-28 10:36 Florian Weimer via Libc-alpha
  2022-12-08 17:11 ` Adhemerval Zanella Netto via Libc-alpha
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer via Libc-alpha @ 2022-11-28 10:36 UTC (permalink / raw)
  To: libc-alpha

The declaration does not conflict with anything.  This simplifies
porting older software to C99 compilers which do not support implicit
function declarations and which need -D_GNU_SOURCE for other function
declarations.  Using __USE_MISC does not seem appropriate here because
other systems (e.g., FreeBSD) do not declare bsd_signal.

---
 signal/signal.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/signal/signal.h b/signal/signal.h
index 78d0d819aa..d175d7c3c4 100644
--- a/signal/signal.h
+++ b/signal/signal.h
@@ -98,7 +98,8 @@ extern __sighandler_t __REDIRECT_NTH (signal,
 # endif
 #endif
 
-#if defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8
+#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
+  || defined __USE_GNU
 /* The X/Open definition of `signal' conflicts with the BSD version.
    So they defined another function `bsd_signal'.  */
 extern __sighandler_t bsd_signal (int __sig, __sighandler_t __handler)

base-commit: f704192911c6c7b65a54beab3ab369fca7609a5d


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

end of thread, other threads:[~2022-12-08 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 10:36 [PATCH] <signal.h>: Make bsd_signal available with _GNU_SOURCE Florian Weimer via Libc-alpha
2022-12-08 17:11 ` Adhemerval Zanella Netto via Libc-alpha
2022-12-08 18:10   ` Florian Weimer via Libc-alpha
2022-12-08 18:23     ` Adhemerval Zanella Netto via Libc-alpha

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