diff options
| author | Eli Zaretskii <eliz@gnu.org> | 2024-09-06 09:34:20 +0300 |
|---|---|---|
| committer | Eli Zaretskii <eliz@gnu.org> | 2024-09-06 09:34:20 +0300 |
| commit | 658715c977c78c312685cd6c594a2cbc0d31fc7d (patch) | |
| tree | b7b52901b5d32bdd65ac8b215ad45b728bbc6dbb /nt | |
| parent | 266e321d966367f9bd9523a0dee901d8c905a0b4 (diff) | |
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'.
Diffstat (limited to 'nt')
| -rw-r--r-- | nt/inc/signal.h | 39 |
1 files changed, 39 insertions, 0 deletions
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 |
