bug-inetutils
[Top][All Lists]
Advanced

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

Re: [bug-inetutils] FW: Bug-inetutils post from address@hidden requires


From: Alfred M. Szmidt
Subject: Re: [bug-inetutils] FW: Bug-inetutils post from address@hidden requires approval
Date: Thu, 26 Oct 2006 08:18:03 +0200 (CEST)

Thank you for the bug reports.  Could you try the following patch?
Another user reported similar problems, but I think it was a bit
different platform.

You will need to have autoconf (2.60) and automake (1.9.6) installed
to rebuild the configure script by running ./autogen.sh

2006-10-26  Alfred M. Szmidt  <address@hidden>

        * configure.ac: Check for sighandler_t and __sighandler_t.
        * libinetutils/setsig.c (SIGHANDLER_T): New macro.
        Use it in function declarations.

--- configure.ac        21 Oct 2006 18:12:26 +0200      1.33
+++ configure.ac        26 Oct 2006 07:55:52 +0200      
@@ -477,8 +478,10 @@ AC_CHECK_TYPES(struct if_nameindex, , ,
    #include <sys/socket.h>
    #include <net/if.h>])
 
-dnl sig_t is the type of a signal handler (4.4BSD)
-AC_CHECK_TYPES(sig_t, , ,
+dnl sighandler_t is the type of the signal handler on GNU variants,
+dnl sig_t is the type of a signal handler on 4.4BSD's,
+dnl other systems use __sighandler_t.
+AC_CHECK_TYPES([sighandler_t, sig_t, __sighandler_t], , ,
   [#include <sys/types.h>
    #include <signal.h> ])
 
--- libinetutils/setsig.c       21 Oct 2006 17:04:04 +0200      1.3
+++ libinetutils/setsig.c       26 Oct 2006 08:04:18 +0200      
@@ -28,10 +28,20 @@
 
 #include <signal.h>
 
+#ifdef HAVE_SIGHANDLER_T
+# define SIGHANDLER_T sighandler_t
+#elif HAVE_SIG_T
+# define SIGHANDLER_T sig_t
+#elif HAVE___SIGHANDLER_T
+# define SIGHANDLER_T __sighandler_t
+#else
+# error "unknown sighandler type, please report this to <address@hidden>"
+#endif
+
 /* This is exactly like the traditional signal function, but turns on the
    SA_RESTART bit where possible.  */
-sig_t
-setsig (int sig, sig_t handler)
+SIGHANDLER_T
+setsig (int sig, SIGHANDLER_T handler)
 {
 #ifdef HAVE_SIGACTION
   struct sigaction sa;




reply via email to

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