Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH 1/2] autoconf: follow the advice to assume RETSIGTYPE is void
- X-seq: zsh-workers 43029
- From: Eitan Adler <lists@xxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH 1/2] autoconf: follow the advice to assume RETSIGTYPE is void
- Date: Sat, 16 Jun 2018 01:04:26 +0000
- Cc: Eitan Adler <lists@xxxxxxxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=from:to:cc:subject:date:message-id; bh=WuuReal8LxgeYI71U9e4oLKLnP/sVfudfMV01otUktw=; b=RWb5maw6O+HyjfFSD7suhNh8EwD6H3Yan+rSeMw+MWCerZlDgTv6RZVakuIQLi81LX zVKBZiUi+Jut5En8sAHwmWIdoiVZ9k0XlZWoYhpsPNdwlc4yQfAy2wMPaCLfu8HCcgVx f1W2h9A8FpF7xyrPmbMn1tytO+vOXNDFWJsVk=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This has not been an issue on any platform for over a decade.
Signed-off-by: Eitan Adler <lists@xxxxxxxxxxxxxx>
---
Src/Modules/zftp.c | 2 +-
Src/signals.c | 2 +-
Src/signals.h | 2 +-
configure.ac | 12 ------------
4 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 24f4b4200..4aaa1f072 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -362,7 +362,7 @@ static jmp_buf zfalrmbuf;
/* The signal handler itself */
/**/
-static RETSIGTYPE
+static void
zfhandler(int sig)
{
if (sig == SIGALRM) {
diff --git a/Src/signals.c b/Src/signals.c
index 4958534e2..20c6fdf4a 100644
--- a/Src/signals.c
+++ b/Src/signals.c
@@ -588,7 +588,7 @@ wait_for_processes(void)
/* the signal handler */
/**/
-mod_export RETSIGTYPE
+mod_export void
zhandler(int sig)
{
sigset_t newmask, oldmask;
diff --git a/Src/signals.h b/Src/signals.h
index 1904f4326..41ac88cce 100644
--- a/Src/signals.h
+++ b/Src/signals.h
@@ -27,7 +27,7 @@
*
*/
-#define SIGNAL_HANDTYPE RETSIGTYPE (*)_((int))
+#define SIGNAL_HANDTYPE void (*)_((int))
#ifndef HAVE_KILLPG
# define killpg(pgrp,sig) kill(-(pgrp),sig)
diff --git a/configure.ac b/configure.ac
index b46e2f4c2..7644ebe52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -955,18 +955,6 @@ dnl --------------
dnl CHECK TYPEDEFS
dnl --------------
-AC_DIAGNOSE([obsolete],[your code may safely assume C89 semantics that RETSIGTYPE is void.
-Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.])dnl
-AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
-[AC_LANG_PROGRAM([#include <sys/types.h>
-#include <signal.h>
-],
- [return *(signal (0, 0)) (0) == 1;])],
- [ac_cv_type_signal=int],
- [ac_cv_type_signal=void])])
-AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
- (`int' or `void').])
-
AC_TYPE_PID_T
AC_TYPE_OFF_T
AC_CHECK_TYPE(ino_t, unsigned long)
--
2.17.1
Messages sorted by:
Reverse Date,
Date,
Thread,
Author