Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
# signal_h.m4 serial 22
|
2022-01-01 07:45:51 +00:00
|
|
|
dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
|
2011-07-06 17:58:37 +00:00
|
|
|
dnl This file is free software; the Free Software Foundation
|
|
|
|
dnl gives unlimited permission to copy and/or distribute it,
|
|
|
|
dnl with or without modifications, as long as this notice is preserved.
|
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
AC_DEFUN_ONCE([gl_SIGNAL_H],
|
2011-07-06 17:58:37 +00:00
|
|
|
[
|
|
|
|
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
|
|
|
|
AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T])
|
|
|
|
gl_NEXT_HEADERS([signal.h])
|
|
|
|
|
|
|
|
# AIX declares sig_atomic_t to already include volatile, and C89 compilers
|
|
|
|
# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
|
|
|
|
AC_CHECK_TYPE([volatile sig_atomic_t], [],
|
|
|
|
[HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
|
|
|
|
#include <signal.h>
|
|
|
|
]])
|
|
|
|
|
2011-09-11 16:52:58 +00:00
|
|
|
dnl Ensure the type pid_t gets defined.
|
|
|
|
AC_REQUIRE([AC_TYPE_PID_T])
|
|
|
|
|
2011-07-06 17:58:37 +00:00
|
|
|
AC_REQUIRE([AC_TYPE_UID_T])
|
|
|
|
|
|
|
|
dnl Persuade glibc <signal.h> to define sighandler_t.
|
|
|
|
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
|
|
|
|
AC_CHECK_TYPE([sighandler_t], [], [HAVE_SIGHANDLER_T=0], [[
|
|
|
|
#include <signal.h>
|
|
|
|
]])
|
|
|
|
|
|
|
|
dnl Check for declarations of anything we want to poison if the
|
|
|
|
dnl corresponding gnulib module is not in use.
|
|
|
|
gl_WARN_ON_USE_PREPARE([[#include <signal.h>
|
|
|
|
]], [pthread_sigmask sigaction
|
|
|
|
sigaddset sigdelset sigemptyset sigfillset sigismember
|
|
|
|
sigpending sigprocmask])
|
Update from Gnulib
This incorporates:
2020-02-22 fchmodat, lchmod: simplify
2020-02-22 lchmod: fix link error on Solaris 10
2020-02-22 use 'restrict' in all POSIX function declarations
2020-02-22 chmodat, chownat: new modules
* lib/gnulib.mk.in: Regenerate.
* lib/inttypes.in.h, lib/openat.h, lib/signal.in.h:
* lib/stdio.in.h, lib/stdlib.in.h, lib/string.in.h:
* lib/sys_stat.in.h, lib/time.in.h, lib/unistd.in.h, m4/inttypes.m4:
* m4/signal_h.m4, m4/stdio_h.m4, m4/stdlib_h.m4, m4/string_h.m4:
* m4/sys_socket_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Copy from Gnulib.
2020-02-23 09:24:21 +00:00
|
|
|
|
|
|
|
AC_REQUIRE([AC_C_RESTRICT])
|
2011-07-06 17:58:37 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([gl_CHECK_TYPE_SIGSET_T],
|
|
|
|
[
|
|
|
|
AC_CHECK_TYPES([sigset_t],
|
|
|
|
[gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
|
|
|
|
[[
|
|
|
|
#include <signal.h>
|
|
|
|
/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
|
|
|
|
#include <sys/types.h>
|
|
|
|
]])
|
|
|
|
if test $gl_cv_type_sigset_t != yes; then
|
|
|
|
HAVE_SIGSET_T=0
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
# gl_SIGNAL_MODULE_INDICATOR([modulename])
|
|
|
|
# sets the shell variable that indicates the presence of the given module
|
|
|
|
# to a C preprocessor expression that will evaluate to 1.
|
|
|
|
# This macro invocation must not occur in macros that are AC_REQUIREd.
|
2011-07-06 17:58:37 +00:00
|
|
|
AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
|
|
|
|
[
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
dnl Ensure to expand the default settings once only.
|
|
|
|
gl_SIGNAL_H_REQUIRE_DEFAULTS
|
2011-07-06 17:58:37 +00:00
|
|
|
gl_MODULE_INDICATOR_SET_VARIABLE([$1])
|
|
|
|
dnl Define it also as a C macro, for the benefit of the unit tests.
|
|
|
|
gl_MODULE_INDICATOR_FOR_TESTS([$1])
|
|
|
|
])
|
|
|
|
|
Update from Gnulib
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove. These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
2021-10-04 19:11:39 +00:00
|
|
|
# Initializes the default values for AC_SUBSTed shell variables.
|
|
|
|
# This macro must not be AC_REQUIREd. It must only be invoked, and only
|
|
|
|
# outside of macros or in macros that are not AC_REQUIREd.
|
|
|
|
AC_DEFUN([gl_SIGNAL_H_REQUIRE_DEFAULTS],
|
|
|
|
[
|
|
|
|
m4_defun(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS], [
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SIGMASK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAISE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGPROCMASK])
|
|
|
|
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGACTION])
|
|
|
|
])
|
|
|
|
m4_require(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS])
|
|
|
|
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
|
|
|
|
])
|
|
|
|
|
2011-07-06 17:58:37 +00:00
|
|
|
AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
|
|
|
|
[
|
|
|
|
dnl Assume proper GNU behavior unless another module says otherwise.
|
|
|
|
HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
|
2011-07-08 20:20:19 +00:00
|
|
|
HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
|
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
2011-09-26 21:30:18 +00:00
|
|
|
HAVE_RAISE=1; AC_SUBST([HAVE_RAISE])
|
2011-07-06 17:58:37 +00:00
|
|
|
HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
|
|
|
|
HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
|
|
|
|
HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
|
|
|
|
HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
|
|
|
|
AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
|
|
|
|
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
|
|
|
|
AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
|
|
|
|
HAVE_SIGHANDLER_T=1; AC_SUBST([HAVE_SIGHANDLER_T])
|
|
|
|
REPLACE_PTHREAD_SIGMASK=0; AC_SUBST([REPLACE_PTHREAD_SIGMASK])
|
Merge from gnulib, improving some licensing wording.
This clarifies and fixes some licensing issues raised by Glenn Morris
<http://lists.gnu.org/archive/html/bug-gnulib/2011-09/msg00397.html>.
It also merges the latest version of texinfo.tex and has some
MSVC-related changes that don't affect Emacs.
* Makefile.in (GNULIB_TOOL_FLAGS): Avoid msvc-inval, msvc-nothrow,
pathmax, and raise, since these are needed only to address
MSVC-related issues that Emacs doesn't have.
* doc/misc/texinfo.tex, lib/dup2.c, lib/gnulib.mk, lib/signal.in.h:
* lib/sigprocmask.c, lib/stat.c, lib/stdio.in.h, lib/sys_stat.in.h:
* lib/unistd.in.h, m4/dup2.m4, m4/getloadavg.m4, m4/gl-comp.m4:
* m4/include_next.m4, m4/signal_h.m4, m4/signalblocking.m4:
* m4/stdint.m4, m4/stdio_h.m4, m4/sys_stat_h.m4, m4/time_h.m4:
* m4/unistd_h.m4: Merge from gnulib.
2011-09-26 21:30:18 +00:00
|
|
|
REPLACE_RAISE=0; AC_SUBST([REPLACE_RAISE])
|
2011-07-06 17:58:37 +00:00
|
|
|
])
|