diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:21:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-10-20 15:21:58 +0200 |
commit | 630f99f29bd31a76d8d24da2975a045452c763ef (patch) | |
tree | 0c801f68561bfb0930a4ade80d7ca3a7940887ab /tests/signal.in.h | |
parent | 84e26c587987e8484d55db4165f188b40c09e94b (diff) | |
parent | 4682deeb62247d34de87f8e777f99e2d337fd377 (diff) |
Update upstream source from tag 'upstream/1.3'
Update to upstream version '1.3'
with Debian dir 8a8e4828ddf646ece6c109b401e08d162be35936
Diffstat (limited to 'tests/signal.in.h')
-rw-r--r-- | tests/signal.in.h | 69 |
1 files changed, 55 insertions, 14 deletions
diff --git a/tests/signal.in.h b/tests/signal.in.h index 107226e3..6239b90a 100644 --- a/tests/signal.in.h +++ b/tests/signal.in.h @@ -139,6 +139,47 @@ typedef void (*sighandler_t) (int); #endif +/* 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 + +#if @GNULIB_SIG2STR@ +# if !@HAVE_SIG2STR@ +_GL_FUNCDECL_SYS (sig2str, int, (int signo, char *str), ); +# endif +_GL_CXXALIAS_SYS (sig2str, int, (int signo, char *str)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (sig2str); +# endif +#elif defined GNULIB_POSIXCHECK +# undef sig2str +# if HAVE_RAW_DECL_SIG2STR +_GL_WARN_ON_USE (sig2str, "sig2str is not portable - " + "use gnulib module sig2str for portability"); +# endif +#endif + +#if @GNULIB_SIG2STR@ +# if !@HAVE_STR2SIG@ +_GL_FUNCDECL_SYS (str2sig, int, (char const *str, int *signo_p), ); +# endif +_GL_CXXALIAS_SYS (str2sig, int, (char const *str, int *signo_p)); +# if __GLIBC__ >= 2 +_GL_CXXALIASWARN (str2sig); +# endif +#elif defined GNULIB_POSIXCHECK +# undef str2sig +# if HAVE_RAW_DECL_STR2SIG +_GL_WARN_ON_USE (str2sig, "str2sig is not portable - " + "use gnulib module sig2str for portability"); +# endif +#endif + + #if @GNULIB_PTHREAD_SIGMASK@ # if @REPLACE_PTHREAD_SIGMASK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -148,7 +189,7 @@ typedef void (*sighandler_t) (int); _GL_FUNCDECL_RPL (pthread_sigmask, int, (int how, const sigset_t *restrict new_mask, - sigset_t *restrict old_mask)); + sigset_t *restrict old_mask), ); _GL_CXXALIAS_RPL (pthread_sigmask, int, (int how, const sigset_t *restrict new_mask, @@ -158,7 +199,7 @@ _GL_CXXALIAS_RPL (pthread_sigmask, int, _GL_FUNCDECL_SYS (pthread_sigmask, int, (int how, const sigset_t *restrict new_mask, - sigset_t *restrict old_mask)); + sigset_t *restrict old_mask), ); # endif _GL_CXXALIAS_SYS (pthread_sigmask, int, (int how, @@ -183,11 +224,11 @@ _GL_WARN_ON_USE (pthread_sigmask, "pthread_sigmask is not portable - " # undef raise # define raise rpl_raise # endif -_GL_FUNCDECL_RPL (raise, int, (int sig)); +_GL_FUNCDECL_RPL (raise, int, (int sig), ); _GL_CXXALIAS_RPL (raise, int, (int sig)); # else # if !@HAVE_RAISE@ -_GL_FUNCDECL_SYS (raise, int, (int sig)); +_GL_FUNCDECL_SYS (raise, int, (int sig), ); # endif _GL_CXXALIAS_SYS (raise, int, (int sig)); # endif @@ -243,7 +284,7 @@ typedef int verify_NSIG_constraint[NSIG <= 32 ? 1 : -1]; # undef sigismember # endif # else -_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig) +_GL_FUNCDECL_SYS (sigismember, int, (const sigset_t *set, int sig), _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigismember, int, (const sigset_t *set, int sig)); @@ -256,7 +297,7 @@ _GL_CXXALIASWARN (sigismember); # undef sigemptyset # endif # else -_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_SYS (sigemptyset, int, (sigset_t *set), _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigemptyset, int, (sigset_t *set)); _GL_CXXALIASWARN (sigemptyset); @@ -268,7 +309,7 @@ _GL_CXXALIASWARN (sigemptyset); # undef sigaddset # endif # else -_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig) +_GL_FUNCDECL_SYS (sigaddset, int, (sigset_t *set, int sig), _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigaddset, int, (sigset_t *set, int sig)); @@ -281,7 +322,7 @@ _GL_CXXALIASWARN (sigaddset); # undef sigdelset # endif # else -_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig) +_GL_FUNCDECL_SYS (sigdelset, int, (sigset_t *set, int sig), _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigdelset, int, (sigset_t *set, int sig)); @@ -294,14 +335,14 @@ _GL_CXXALIASWARN (sigdelset); # undef sigfillset # endif # else -_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_SYS (sigfillset, int, (sigset_t *set), _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigfillset, int, (sigset_t *set)); _GL_CXXALIASWARN (sigfillset); /* Return the set of those blocked signals that are pending. */ # if !@HAVE_POSIX_SIGNALBLOCKING@ -_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set) _GL_ARG_NONNULL ((1))); +_GL_FUNCDECL_SYS (sigpending, int, (sigset_t *set), _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (sigpending, int, (sigset_t *set)); _GL_CXXALIASWARN (sigpending); @@ -318,7 +359,7 @@ _GL_CXXALIASWARN (sigpending); _GL_FUNCDECL_SYS (sigprocmask, int, (int operation, const sigset_t *restrict set, - sigset_t *restrict old_set)); + sigset_t *restrict old_set), ); # endif _GL_CXXALIAS_SYS (sigprocmask, int, (int operation, @@ -343,7 +384,7 @@ typedef void (*_gl_function_taking_int_returning_void_t) (int); # define signal rpl_signal # endif _GL_FUNCDECL_RPL (signal, _gl_function_taking_int_returning_void_t, - (int sig, _gl_function_taking_int_returning_void_t func)); + (int sig, _gl_function_taking_int_returning_void_t func), ); _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); # else @@ -351,7 +392,7 @@ _GL_CXXALIAS_RPL (signal, _gl_function_taking_int_returning_void_t, because it occurs in <sys/signal.h>, not <signal.h> directly. */ # if defined __OpenBSD__ _GL_FUNCDECL_SYS (signal, _gl_function_taking_int_returning_void_t, - (int sig, _gl_function_taking_int_returning_void_t func)); + (int sig, _gl_function_taking_int_returning_void_t func), ); # endif _GL_CXXALIAS_SYS (signal, _gl_function_taking_int_returning_void_t, (int sig, _gl_function_taking_int_returning_void_t func)); @@ -469,7 +510,7 @@ struct sigaction # endif _GL_FUNCDECL_SYS (sigaction, int, (int, const struct sigaction *restrict, - struct sigaction *restrict)); + struct sigaction *restrict), ); # elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ |