zsh-workers
 help / color / mirror / code / Atom feed
From: Eitan Adler <lists@eitanadler.com>
To: zsh-workers@zsh.org
Cc: Eitan Adler <lists@eitanadler.com>
Subject: [PATCH 1/2] autoconf: follow the advice to assume RETSIGTYPE is void
Date: Sat, 16 Jun 2018 01:04:26 +0000	[thread overview]
Message-ID: <20180616010427.2916-1-lists@eitanadler.com> (raw)

This has not been an issue on any platform for over a decade.

Signed-off-by: Eitan Adler <lists@eitanadler.com>
---
 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


                 reply	other threads:[~2018-06-16  2:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180616010427.2916-1-lists@eitanadler.com \
    --to=lists@eitanadler.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).