bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] REGSIGTYPE?


From: Alfred M. Szmidt
Subject: [bug-inetutils] REGSIGTYPE?
Date: Sat, 18 Jun 2011 10:35:35 -0400

Do we still have platforms that use int instead of void as return
value for signal handlers?  Some really old systems, dating back to
K&R C used to return int, but we don't support K&R C since ages so
this change should be safe...

diff --git a/ChangeLog b/ChangeLog
index cf64cab..2a50f5f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2011-06-18  Alfred M. Szmidt  <address@hidden>
 
+       * whois/whois.h: Replace RETSIGTYPE with void; this is old K&Rism.
+       * whois/whois.c: Likewise.
+       * telnet/sys_bsd.c (ayt): Likewise.
+       * talk/invite.c (re_invite): Likewise.
+       * talk/init_disp.c (sig_sent): Likewise.
+       * src/syslogd.c (trigger_restart): Likewise.
+       * src/rsh.c: Likewise.
+       * src/rlogind.c (cleanup): Likewise.
+       * src/rlogin.c (copytochild): Likewise.
+       * src/rcp.c (lostconn): Likewise.
+       * src/inetd.c (signal_set_handler): Likewise.
+       * ping/ping6.c (sig_int): Likewise.
+       * ping/ping.c (sig_int): Likewise.
+       * libtelnet/auth.c (auth_intr): Likewise.
+       * libinetutils/daemon.c (waitdaemon_timeout): Likewise.
+
+2011-06-18  Alfred M. Szmidt  <address@hidden>
+
        * bootstrap.conf (gnulib_modules): Use malloc-gnu and realloc-gnu
        instead of the old malloc and realloc modules.
 
diff --git a/ftp/cmds.c b/ftp/cmds.c
index 58dd5a6..5004487 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -834,7 +834,7 @@ getit (int argc, char **argv, int restartit, char *mode)
   return (0);
 }
 
-RETSIGTYPE
+void
 mabort (int signo ARG_UNUSED)
 {
   int ointer;
diff --git a/ftp/ftp.c b/ftp/ftp.c
index ecf4e67..7aad787 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -341,7 +341,7 @@ login (char *host)
   return (1);
 }
 
-RETSIGTYPE
+void
 cmdabort (int sig ARG_UNUSED)
 {
 
diff --git a/ftp/main.c b/ftp/main.c
index 38e36f0..1655e82 100644
--- a/ftp/main.c
+++ b/ftp/main.c
@@ -259,13 +259,13 @@ main (int argc, char *argv[])
     }
 }
 
-RETSIGTYPE
+void
 intr (int sig ARG_UNUSED)
 {
   longjmp (toplevel, 1);
 }
 
-RETSIGTYPE
+void
 lostpeer (int sig ARG_UNUSED)
 {
   if (connected)
diff --git a/ftpd/ftpd.c b/ftpd/ftpd.c
index b4bf1c7..711acaa 100644
--- a/ftpd/ftpd.c
+++ b/ftpd/ftpd.c
@@ -575,7 +575,7 @@ curdir (void)
   return (cred.guest ? path + 1 : path);
 }
 
-static RETSIGTYPE
+static void
 sigquit (int signo)
 {
   syslog (LOG_ERR, "got signal %s", strsignal (signo));
@@ -583,7 +583,7 @@ sigquit (int signo)
 }
 
 
-static RETSIGTYPE
+static void
 lostconn (int signo ARG_UNUSED)
 {
   if (debug)
@@ -1684,7 +1684,7 @@ dologout (int status)
   _exit (status);
 }
 
-static RETSIGTYPE
+static void
 myoob (int signo ARG_UNUSED)
 {
   char *cp;
diff --git a/ftpd/server_mode.c b/ftpd/server_mode.c
index 89e11a0..68902b7 100644
--- a/ftpd/server_mode.c
+++ b/ftpd/server_mode.c
@@ -83,7 +83,7 @@ check_host (struct sockaddr *sa)
 }
 #endif
 
-static RETSIGTYPE
+static void
 reapchild (int signo ARG_UNUSED)
 {
   int save_errno = errno;
diff --git a/libinetutils/daemon.c b/libinetutils/daemon.c
index 92a8091..f9c29cf 100644
--- a/libinetutils/daemon.c
+++ b/libinetutils/daemon.c
@@ -104,7 +104,7 @@
 
 #define MAXFD 64
 
-RETSIGTYPE
+void
 waitdaemon_timeout (int signo)
 {
   int left;
diff --git a/libtelnet/auth.c b/libtelnet/auth.c
index 831434c..654004f 100644
--- a/libtelnet/auth.c
+++ b/libtelnet/auth.c
@@ -649,7 +649,7 @@ auth_finished (TN_Authenticator * ap, int result)
   validuser = result;
 }
 
-static RETSIGTYPE
+static void
 auth_intr (int sig ARG_UNUSED)
 {
   auth_finished (0, AUTH_REJECT);
diff --git a/ping/ping.c b/ping/ping.c
index 826c0ec..9319a47 100644
--- a/ping/ping.c
+++ b/ping/ping.c
@@ -302,7 +302,7 @@ int (*decode_type (const char *arg)) (char *hostname)
 
 int volatile stop = 0;
 
-RETSIGTYPE
+void
 sig_int (int signal)
 {
   stop = 1;
diff --git a/ping/ping6.c b/ping/ping6.c
index 7d38396..2fcc9a4 100644
--- a/ping/ping6.c
+++ b/ping/ping6.c
@@ -258,7 +258,7 @@ ipaddr2str (struct sockaddr_in6 *from)
 
 static volatile int stop = 0;
 
-static RETSIGTYPE
+static void
 sig_int (int signal)
 {
   stop = 1;
diff --git a/src/inetd.c b/src/inetd.c
index 9aa76cd..39a4e5d 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -350,7 +350,7 @@ bi_lookup (const struct servtab *sep)
 #endif
 
 void
-signal_set_handler (int signo, RETSIGTYPE (*handler) ())
+signal_set_handler (int signo, void (*handler) ())
 {
 #if defined HAVE_SIGACTION
   struct sigaction sa;
diff --git a/src/rcp.c b/src/rcp.c
index a05145a..a89ed91 100644
--- a/src/rcp.c
+++ b/src/rcp.c
@@ -1222,7 +1222,7 @@ allocbuf (BUF * bp, int fd, int blksize)
   return (bp);
 }
 
-RETSIGTYPE
+void
 lostconn (int signo)
 {
   if (!iamremote)
diff --git a/src/rlogin.c b/src/rlogin.c
index f709bd4..7cf319b 100644
--- a/src/rlogin.c
+++ b/src/rlogin.c
@@ -186,24 +186,24 @@ int get_window_size (int, struct winsize *);
 #endif
 struct winsize winsize;
 
-RETSIGTYPE catch_child (int);
-RETSIGTYPE copytochild (int);
+void catch_child (int);
+void copytochild (int);
 void doit (sigset_t *);
 void done (int);
 void echo (char);
 u_int getescape (char *);
-RETSIGTYPE lostpeer (int);
+void lostpeer (int);
 void mode (int);
-RETSIGTYPE oob (int);
+void oob (int);
 int reader (sigset_t *);
 void sendwindow (void);
 void setsignal (int);
 int speed (int);
 unsigned int speed_translate (unsigned int);
-RETSIGTYPE sigwinch (int);
+void sigwinch (int);
 void stop (char);
 void writer (void);
-RETSIGTYPE writeroob (int);
+void writeroob (int);
 
 #if defined KERBEROS || defined SHISHI
 void warning (const char *, ...);
@@ -816,7 +816,7 @@ int dosigwinch;
  * This is called when the reader process gets the out-of-band (urgent)
  * request to turn on the window-changing protocol.
  */
-RETSIGTYPE
+void
 writeroob (int signo ARG_UNUSED)
 {
   if (dosigwinch == 0)
@@ -827,7 +827,7 @@ writeroob (int signo ARG_UNUSED)
   dosigwinch = 1;
 }
 
-RETSIGTYPE
+void
 catch_child (int signo ARG_UNUSED)
 {
   int status;
@@ -990,7 +990,7 @@ stop (char cmdc)
   sigwinch (0);                        /* check for size changes */
 }
 
-RETSIGTYPE
+void
 sigwinch (int signo ARG_UNUSED)
 {
   struct winsize ws;
@@ -1047,7 +1047,7 @@ pid_t ppid;
 int rcvcnt, rcvstate;
 char rcvbuf[8 * 1024];
 
-RETSIGTYPE
+void
 oob (int signo ARG_UNUSED)
 {
   char mark;
@@ -1257,7 +1257,7 @@ mode (int f)
     }
 }
 
-RETSIGTYPE
+void
 lostpeer (int signo ARG_UNUSED)
 {
   setsig (SIGPIPE, SIG_IGN);
@@ -1266,7 +1266,7 @@ lostpeer (int signo ARG_UNUSED)
 }
 
 /* copy SIGURGs to the child process. */
-RETSIGTYPE
+void
 copytochild (int signo ARG_UNUSED)
 {
   kill (child, SIGURG);
diff --git a/src/rlogind.c b/src/rlogind.c
index eda944c..167c8d8 100644
--- a/src/rlogind.c
+++ b/src/rlogind.c
@@ -194,12 +194,12 @@ int do_krb_login (int infd, struct auth_data *ap, const 
char **msg);
 void getstr (int infd, char **ptr, const char *prefix);
 void protocol (int f, int p, struct auth_data *ap);
 int control (int pty, char *cp, size_t n);
-RETSIGTYPE cleanup (int signo);
+void cleanup (int signo);
 void fatal (int f, const char *msg, int syserr);
 int in_local_domain (char *hostname);
 char *topdomain (char *name, int max_dots);
 
-RETSIGTYPE
+void
 rlogind_sigchld (int sig)
 {
   pid_t pid;
@@ -1475,7 +1475,7 @@ control (int pty, char *cp, size_t n)
   return (4 + sizeof w);
 }
 
-RETSIGTYPE
+void
 cleanup (int signo ARG_UNUSED)
 {
   char *p;
diff --git a/src/rsh.c b/src/rsh.c
index dbb6c36..4a50927 100644
--- a/src/rsh.c
+++ b/src/rsh.c
@@ -115,7 +115,7 @@ int wlen;
 int rfd2;
 
 char *copyargs (char **);
-RETSIGTYPE sendsig (int);
+void sendsig (int);
 void talk (int, sigset_t *, pid_t, int);
 void warning (const char *, ...);
 
diff --git a/src/syslogd.c b/src/syslogd.c
index 3630473..e9d32e6 100644
--- a/src/syslogd.c
+++ b/src/syslogd.c
@@ -1502,13 +1502,13 @@ logerror (const char *type)
   logmsg (LOG_SYSLOG | LOG_ERR, buf, LocalHostName, ADDDATE);
 }
 
-RETSIGTYPE
+void
 doexit (int signo ARG_UNUSED)
 {
   _exit (0);
 }
 
-RETSIGTYPE
+void
 die (int signo)
 {
   struct filed *f;
@@ -1551,7 +1551,7 @@ die (int signo)
 }
 
 /* INIT -- Initialize syslogd from configuration table.  */
-RETSIGTYPE
+void
 init (int signo ARG_UNUSED)
 {
   FILE *cf;
@@ -2020,7 +2020,7 @@ decode (const char *name, CODE * codetab)
   return -1;
 }
 
-RETSIGTYPE
+void
 dbg_toggle (int signo ARG_UNUSED)
 {
   int dbg_save = dbg_output;
@@ -2052,7 +2052,7 @@ dbg_printf (const char *fmt, ...)
    not being doing this during a signal handler.  Instead we simply
    set a flag variable which will tell the main loop to go through a
    restart.  */
-RETSIGTYPE
+void
 trigger_restart (int signo ARG_UNUSED)
 {
   restart = 1;
diff --git a/talk/init_disp.c b/talk/init_disp.c
index a71765e..0accccf 100644
--- a/talk/init_disp.c
+++ b/talk/init_disp.c
@@ -62,7 +62,7 @@
 #include <error.h>
 #include "talk.h"
 
-static RETSIGTYPE
+static void
 sig_sent (int sig ARG_UNUSED)
 {
 
diff --git a/talk/invite.c b/talk/invite.c
index dbf6280..b985a80 100644
--- a/talk/invite.c
+++ b/talk/invite.c
@@ -114,7 +114,7 @@ announce_invite (void)
 /*
  * Routine called on interupt to re-invite the callee
  */
-RETSIGTYPE
+void
 re_invite (int sig)
 {
 
diff --git a/telnet/sys_bsd.c b/telnet/sys_bsd.c
index 2b01282..fc14211 100644
--- a/telnet/sys_bsd.c
+++ b/telnet/sys_bsd.c
@@ -71,7 +71,7 @@
 #include "types.h"
 
 #ifdef SIGINFO
-extern RETSIGTYPE ayt_status ();
+extern void ayt_status ();
 #endif
 
 int tout,                      /* Output file descriptor */
@@ -671,10 +671,10 @@ TerminalNewMode (register int f)
   if (f != -1)
     {
 #ifdef SIGTSTP
-      RETSIGTYPE susp (int sig);
+      void susp (int sig);
 #endif /* SIGTSTP */
 #ifdef SIGINFO
-      RETSIGTYPE ayt ();
+      void ayt ();
 #endif
 
 #ifdef SIGTSTP
@@ -726,7 +726,7 @@ TerminalNewMode (register int f)
   else
     {
 #ifdef SIGINFO
-      RETSIGTYPE ayt_status ();
+      void ayt_status ();
 
       signal (SIGINFO, ayt_status);
 #endif
@@ -938,7 +938,7 @@ NetSetPgrp (int fd)
  * Various signal handling routines.
  */
 
-RETSIGTYPE
+void
 deadpeer (int sig)
 {
   setcommandmode ();
@@ -946,7 +946,7 @@ deadpeer (int sig)
 }
 
 
-RETSIGTYPE
+void
 intr (int sig)
 {
   if (localchars)
@@ -959,7 +959,7 @@ intr (int sig)
 }
 
 
-RETSIGTYPE
+void
 intr2 (int sig)
 {
   if (localchars)
@@ -975,7 +975,7 @@ intr2 (int sig)
 }
 
 #ifdef SIGTSTP
-RETSIGTYPE
+void
 susp (int sig)
 {
   if ((rlogin != _POSIX_VDISABLE) && rlogin_susp ())
@@ -986,7 +986,7 @@ susp (int sig)
 #endif
 
 #ifdef SIGWINCH
-RETSIGTYPE
+void
 sendwin (int sig)
 {
   if (connected)
@@ -997,7 +997,7 @@ sendwin (int sig)
 #endif
 
 #ifdef SIGINFO
-RETSIGTYPE
+void
 ayt (int sig)
 {
   if (connected)
diff --git a/whois/whois.c b/whois/whois.c
index f2cb2b2..88d5a75 100644
--- a/whois/whois.c
+++ b/whois/whois.c
@@ -588,7 +588,7 @@ closeconn (const int fd)
   close (fd);
 }
 
-RETSIGTYPE
+void
 sighandler (int signum)
 {
   closeconn (sockfd);
diff --git a/whois/whois.h b/whois/whois.h
index 372eeaf..c83b04d 100644
--- a/whois/whois.h
+++ b/whois/whois.h
@@ -61,7 +61,7 @@ void do_query (const int, const char *);
 const char *query_crsnic (const int, const char *);
 int openconn (const char *, const char *);
 void closeconn (const int);
-RETSIGTYPE sighandler (int);
+void sighandler (int);
 unsigned long myinet_aton (const char *);
 int domcmp (const char *, const char *);
 int domfind (const char *, const char *[]);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]