commit 658715c977c78c312685cd6c594a2cbc0d31fc7d (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Fri Sep 6 09:34:20 2024 +0300 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'. 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 . */ + +#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 + +#endif commit 266e321d966367f9bd9523a0dee901d8c905a0b4 Author: Eli Zaretskii Date: Fri Sep 6 09:24:56 2024 +0300 Revert "Fix MinGW build broken by recent update from Gnulib" This reverts commit b737c6125d69497ad5d2a29d4b5a2b17698992e5. It is no longer needed with the introduction of nt/inc/signal.h. diff --git a/lib/sig2str.h b/lib/sig2str.h index 03d50c94317..1abdb140e5a 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -19,21 +19,6 @@ #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 - -#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 commit e218d090876d9bffca06284247cc4cba89677ec9 Author: Eli Zaretskii Date: Fri Sep 6 09:24:30 2024 +0300 Revert "; Fix last change in lib/sig2str.h." This reverts commit 91e7b47d6c56e7963be232de8057e1a3f710f1b5. It is no longer needed with the introduction of nt/inc/signal.h. diff --git a/lib/sig2str.h b/lib/sig2str.h index bfb207777cc..03d50c94317 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -17,11 +17,6 @@ /* 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 commit 42da79c07583648b8677f2bcc880fad3244ac32e Author: Eli Zaretskii Date: Fri Sep 6 09:23:55 2024 +0300 Revert "; Another fix for str2sig.h" This reverts commit df57e44a08fd5c7dc159254a40f5d2e4d008e8df. It is no longer needed with introduction of nt/inc/signal.h. diff --git a/lib/sig2str.h b/lib/sig2str.h index 62b6d628f12..bfb207777cc 100644 --- a/lib/sig2str.h +++ b/lib/sig2str.h @@ -32,10 +32,10 @@ # define SIG2STR_MAX (5 + 1 + 10 + 1 + 2) #endif -#ifdef __MINGW32__ +#ifndef HAVE_SIG2STR int sig2str (int, char *); #endif -#ifdef __MINGW32__ +#ifndef HAVE_STR2SIG int str2sig (char const *, int *); #endif