emacs-diffs
[Top][All Lists]
Advanced

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

master 658715c977c 4/4: Rework fix of MinGW build due to Gnulib update


From: Eli Zaretskii
Subject: master 658715c977c 4/4: Rework fix of MinGW build due to Gnulib update
Date: Fri, 6 Sep 2024 02:36:59 -0400 (EDT)

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

    Rework fix of MinGW build due to Gnulib update
    
    This commit finishes the rework started by reverting changes
    to lib/sig2str.h, by adding Emacs-private additions to
    signal.h.
    * nt/inc/signal.h: New file, defines SIG2STR_MAX and
    prototypes of 'sig2str' and 'str2sig'.
---
 nt/inc/signal.h | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/nt/inc/signal.h b/nt/inc/signal.h
new file mode 100644
index 00000000000..fafbfe32416
--- /dev/null
+++ b/nt/inc/signal.h
@@ -0,0 +1,39 @@
+/* Addition to system header signal.h file for building GNU Emacs on
+   Windows.  It is needed because Posix mandates sig2str should appear
+   in signal.h, and Gnulib insists on assuming that, and the MinGW build
+   cannot use Gnulib's signal.h.
+
+Copyright (C) 2024 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
+
+GNU Emacs is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#ifndef _NT_INC_SIGNAL_H_
+# define _NT_INC_SIGNAL_H_
+
+/* Maximum size of a signal name returned by sig2str(), including the
+   terminating NUL byte.  Shamelessly stolen from Gnulib.  */
+# 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
+
+int sig2str (int, char *);
+int str2sig (char const *, int *);
+
+# include_next <signal.h>
+
+#endif



reply via email to

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