libreplace: Remove the obsolete signal type cast.
[kamenim/samba.git] / lib / replace / getpass.c
index aab53c533de1aebd833af3f3b69310d1502cf827..f95109f2b43ddd0fc7b751ffde93aae3a8b4640c 100644 (file)
@@ -34,10 +34,6 @@ typedef int sig_atomic_t;
 #define SIGCLD SIGCHLD
 #endif
 
-#ifndef SIGNAL_CAST
-#define SIGNAL_CAST (RETSIGTYPE (*)(int))
-#endif
-
 #ifdef SYSV_TERMIO 
 
 /* SYSTEM V TERMIO HANDLING */
@@ -99,7 +95,7 @@ static int tcsetattr(int fd, int flags, struct sgttyb *_t)
 static struct termios t;
 #endif /* SYSV_TERMIO */
 
-static void catch_signal(int signum,void (*handler)(int ))
+static void catch_signal(int signum, void (*handler)(int ))
 {
 #ifdef HAVE_SIGACTION
        struct sigaction act;
@@ -131,7 +127,7 @@ static int in_fd = -1;
  Signal function to tell us were ^C'ed.
 ****************************************************************/
 
-static void gotintr_sig(void)
+static void gotintr_sig(int signum)
 {
        gotintr = 1;
        if (in_fd != -1)
@@ -148,7 +144,7 @@ char *rep_getpass(const char *prompt)
        size_t nread;
 
        /* Catch problematic signals */
-       catch_signal(SIGINT, SIGNAL_CAST gotintr_sig);
+       catch_signal(SIGINT, gotintr_sig);
 
        /* Try to write to and read from the terminal if we can.
                If we can't open the terminal, use stderr and stdin.  */
@@ -211,7 +207,7 @@ char *rep_getpass(const char *prompt)
                fclose(in);
 
        /* Catch problematic signals */
-       catch_signal(SIGINT, SIGNAL_CAST SIG_DFL);
+       catch_signal(SIGINT, SIG_DFL);
 
        if (gotintr) {
                printf("Interrupted by signal.\n");