From 3d12567133bfb4082a5115f16a71a865ff2af7fb Mon Sep 17 00:00:00 2001 From: Ricardo Branco Date: Sat, 10 May 2025 22:56:03 +0200 Subject: Add the POSIX sig2str(3) & str2sig(3) calls Signed-off-by: Ricardo Branco Reviewed by: imp, kib, des, jilles Pull Request: https://github.com/freebsd/freebsd-src/pull/1696 --- include/signal.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/signal.h b/include/signal.h index c1d341f317f4..22fefb63568f 100644 --- a/include/signal.h +++ b/include/signal.h @@ -40,6 +40,10 @@ #include #endif +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE +#define SIG2STR_MAX 32 /* size of buffer required for sig2str() */ +#endif + __NULLABILITY_PRAGMA_PUSH #if __BSD_VISIBLE @@ -119,6 +123,11 @@ void psiginfo(const siginfo_t *, const char *); void psignal(int, const char *); #endif +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE +int sig2str(int, char *); +int str2sig(const char * __restrict, int * __restrict); +#endif + #if __BSD_VISIBLE int sigandset(sigset_t *dest, const sigset_t *left, const sigset_t *right); int sigblock(int); -- cgit v1.3