From 0c17a34cdfbab86b4b44ea2b123f6d072e00ab79 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 5 Sep 2024 09:22:41 -0700 Subject: [PATCH] Move MinGW sig2str workaround into ms-w32.h * lib/sig2str.h: Go back to syncing exactly with Gnulib. * nt/inc/ms-w32.h (SIG2STR_MAX): New macro. (sig2str, str2sig): New decls. --- lib/sig2str.h | 20 -------------------- nt/inc/ms-w32.h | 7 +++++++ 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/lib/sig2str.h b/lib/sig2str.h index 62b6d628f12..1abdb140e5a 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -17,28 +17,8 @@ /* Written by Paul Eggert. */ -/* This file uses HAVE_* macros. */ -# if !_GL_CONFIG_H_INCLUDED -# error "Please include config.h first." -# endif - #include -/* Maximum size of a signal name returned by sig2str(), including the - terminating NUL byte. */ -#ifndef SIG2STR_MAX -/* The longest one: "RTMAX", then "+" or "-", then up to 10 digits, then NUL. - Add + 2 as a reserve for the future. */ -# define SIG2STR_MAX (5 + 1 + 10 + 1 + 2) -#endif - -#ifdef __MINGW32__ -int sig2str (int, char *); -#endif -#ifdef __MINGW32__ -int str2sig (char const *, int *); -#endif - /* An upper bound on signal numbers allowed by the system. */ #if defined _sys_nsig diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 7212e4d2984..55273cbce79 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -427,6 +427,13 @@ #define SIG_BLOCK 1 #define SIG_SETMASK 2 #define SIG_UNBLOCK 3 +/* Maximum size of a signal name returned by sig2str(), including the + terminating NUL byte. The longest one: "RTMAX", then "+" or "-", + then up to 10 digits, then NUL. Add + 2 as a reserve for the future. */ +#define SIG2STR_MAX (5 + 1 + 10 + 1 + 2) + +extern int sig2str (int, char *); +extern int str2sig (char const *, int *); extern int sigemptyset (sigset_t *); extern int sigaddset (sigset_t *, int); extern int sigfillset (sigset_t *); -- 2.43.0