emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b737c6125d6 1/2: Fix MinGW build broken by recent update from Gnu


From: Eli Zaretskii
Subject: master b737c6125d6 1/2: Fix MinGW build broken by recent update from Gnulib
Date: Thu, 5 Sep 2024 01:26:33 -0400 (EDT)

branch: master
commit b737c6125d69497ad5d2a29d4b5a2b17698992e5
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix MinGW build broken by recent update from Gnulib
    
    Gnulib moved the prototypes of 'sig2str' and 'str2sig' from
    sig2str.h to signal.h, but MinGW does not use the Gnulib
    signal.h header, and doesn't have these functions in its
    own signal.h.
    * lib/sig2str.h (SIG2STR_MAX, sig2str, str2sig): Define and
    prototype if not already defined.
---
 lib/sig2str.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/lib/sig2str.h b/lib/sig2str.h
index 1abdb140e5a..03d50c94317 100644
--- a/lib/sig2str.h
+++ b/lib/sig2str.h
@@ -19,6 +19,21 @@
 
 #include <signal.h>
 
+/* 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
+
+#ifndef HAVE_SIG2STR
+int sig2str (int, char *);
+#endif
+#ifndef HAVE_STR2SIG
+int str2sig (char const *, int *);
+#endif
+
 /* An upper bound on signal numbers allowed by the system.  */
 
 #if defined _sys_nsig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]