Module Name: src Committed By: kre Date: Thu Sep 19 14:41:05 UTC 2024
Modified Files: src/sys/sys: signal.h Log Message: PR lib/58674 (not really so much any more) Correct previous. bsd_signal should only be visible with _NETBSD_SOURCE - it isn't any kind of standard function (despite also existing in other systems). Turns out that it used to be an XSI function, back in the dark ages ('twas removed in POSIX issue 7, back in 2008, after being marked obsolete in issue 6 (2001)). So, make it visible to any applications that request a suitable X/Open version (and of course, for _NETBSD_SOURCE). Still no effect on the issue for the PR. To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.78 src/sys/sys/signal.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/sys/signal.h diff -u src/sys/sys/signal.h:1.77 src/sys/sys/signal.h:1.78 --- src/sys/sys/signal.h:1.77 Thu Sep 19 13:16:30 2024 +++ src/sys/sys/signal.h Thu Sep 19 14:41:05 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.h,v 1.77 2024/09/19 13:16:30 kre Exp $ */ +/* $NetBSD: signal.h,v 1.78 2024/09/19 14:41:05 kre Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1991, 1993 @@ -321,8 +321,21 @@ void (*signal(int, void (*)(int)))(int); #if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_NETBSD_SOURCE) int sigqueue(pid_t, int, const union sigval); #endif -#if defined(_NETBSD_SOURCE) + +#if defined(_NETBSD_SOURCE) || \ + (!defined (_XOPEN_SOURCE) && defined(_XOPEN_VERSION) && \ + (_XOPEN_VERSION - 0) >= 4) || \ + (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0) <= 600) +/* + * bsd_signal() was added to the standards in POSIX issue 4 (SusV4) + * (release 2 of SusV4) and then removed in POSIX issue 7 (2008), + * after being marked obsolete in POSIX issue 6 (2001). It was + * always an X/Open extension function (though was moved to the + * base POSIX spec in issue 5, but still as an extension). + */ void (*bsd_signal(int, void (*)(int)))(int); +#endif +#if defined(_NETBSD_SOURCE) int sigqueueinfo(pid_t, const siginfo_t *); #endif __END_DECLS