aboutsummaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorPaul Eggert2012-12-07 18:30:51 -0800
committerPaul Eggert2012-12-07 18:30:51 -0800
commitd983a10b9a070fd8f6d4f48ec44e5514b62feaa6 (patch)
tree1b7353b39c508615eb0d2cf4475fdfabf8ef6ce0 /m4
parent9cdde1e2dfdd7b1a4e52294bca1467dc7a48c77a (diff)
downloademacs-d983a10b9a070fd8f6d4f48ec44e5514b62feaa6.tar.gz
emacs-d983a10b9a070fd8f6d4f48ec44e5514b62feaa6.zip
Assume POSIX 1003.1-1988 or later for signal.h.
Exceptions: do not assume SIGCONT, SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU, SIGUSR1, SIGUSR2, as Microsoft platforms lack these. * admin/CPP-DEFINES (SIGALRM, SIGCHLD, SIGHUP, SIGKILL, SIGPIPE, SIGQUIT): Remove. (SIGTRAP): Remove this one too, as config.h no longer defines it. * admin/merge-gnulib (GNULIB_MODULES): Add sig2str. * configure.ac (PTY_OPEN, PTY_TTY_NAME_SPRINTF): Use SIGCHLD rather than SIGCLD. * lib/sig2str.c, lib/sig2str.h, m4/sig2str.m4: New files, from gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * lib/makefile.w32-in (GNULIBOBJS): Add $(BUILD)/sig2str.$(O). * src/process.c [subprocesses]: Include <c-ctype.h>, <sig2str.h>. (deleted_pid_list, Fdelete_process, create_process) (record_child_status_change, handle_child_signal, deliver_child_signal) (init_process_emacs, syms_of_process): Assume SIGCHLD is defined. (parse_signal): Remove. All uses removed. (abbr_to_signal): New static function. (Fsignal_process): Use it to convert signal names to ints. * src/sysdep.c (sys_suspend) [!DOS_NT]: Use kill (0, ...) rather than kill (getpgrp (), ...). (emacs_sigaction_init): Assume SIGCHLD is defined. (init_signals): Assume SIGALRM, SIGCHLD, SIGHUP, SIGKILL, SIGPIPE, and SIGQUIT are defined. Do not worry about SIGCLD any more. * src/syssignal.h (EMACS_KILLPG): Remove. All uses replaced by 'kill' with a negative pid. (SIGCHLD): Remove definition, as we now assume SIGCHLD. * src/w32proc.c (sys_kill): Support negative pids compatibly with POSIX. Fixes: debbugs:13026
Diffstat (limited to 'm4')
-rw-r--r--m4/gnulib-comp.m49
-rw-r--r--m4/sig2str.m415
2 files changed, 24 insertions, 0 deletions
diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4
index 1d09eb8ef92..ebfbdf933f6 100644
--- a/m4/gnulib-comp.m4
+++ b/m4/gnulib-comp.m4
@@ -87,6 +87,7 @@ AC_DEFUN([gl_EARLY],
87 # Code from module pthread_sigmask: 87 # Code from module pthread_sigmask:
88 # Code from module readlink: 88 # Code from module readlink:
89 # Code from module root-uid: 89 # Code from module root-uid:
90 # Code from module sig2str:
90 # Code from module signal-h: 91 # Code from module signal-h:
91 # Code from module snippet/_Noreturn: 92 # Code from module snippet/_Noreturn:
92 # Code from module snippet/arg-nonnull: 93 # Code from module snippet/arg-nonnull:
@@ -245,6 +246,11 @@ AC_DEFUN([gl_INIT],
245 gl_PREREQ_READLINK 246 gl_PREREQ_READLINK
246 fi 247 fi
247 gl_UNISTD_MODULE_INDICATOR([readlink]) 248 gl_UNISTD_MODULE_INDICATOR([readlink])
249 gl_FUNC_SIG2STR
250 if test $ac_cv_func_sig2str = no; then
251 AC_LIBOBJ([sig2str])
252 gl_PREREQ_SIG2STR
253 fi
248 gl_SIGNAL_H 254 gl_SIGNAL_H
249 gl_TYPE_SOCKLEN_T 255 gl_TYPE_SOCKLEN_T
250 gt_TYPE_SSIZE_T 256 gt_TYPE_SSIZE_T
@@ -681,6 +687,8 @@ AC_DEFUN([gl_FILE_LIST], [
681 lib/sha256.h 687 lib/sha256.h
682 lib/sha512.c 688 lib/sha512.c
683 lib/sha512.h 689 lib/sha512.h
690 lib/sig2str.c
691 lib/sig2str.h
684 lib/signal.in.h 692 lib/signal.in.h
685 lib/stat-time.c 693 lib/stat-time.c
686 lib/stat-time.h 694 lib/stat-time.h
@@ -760,6 +768,7 @@ AC_DEFUN([gl_FILE_LIST], [
760 m4/sha1.m4 768 m4/sha1.m4
761 m4/sha256.m4 769 m4/sha256.m4
762 m4/sha512.m4 770 m4/sha512.m4
771 m4/sig2str.m4
763 m4/signal_h.m4 772 m4/signal_h.m4
764 m4/socklen.m4 773 m4/socklen.m4
765 m4/ssize_t.m4 774 m4/ssize_t.m4
diff --git a/m4/sig2str.m4 b/m4/sig2str.m4
new file mode 100644
index 00000000000..43650b045e7
--- /dev/null
+++ b/m4/sig2str.m4
@@ -0,0 +1,15 @@
1# serial 7
2dnl Copyright (C) 2002, 2005-2006, 2009-2012 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved.
6
7AC_DEFUN([gl_FUNC_SIG2STR],
8[
9 AC_CHECK_FUNCS([sig2str])
10])
11
12# Prerequisites of lib/sig2str.c.
13AC_DEFUN([gl_PREREQ_SIG2STR], [
14 :
15])