]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Stop using sig_t
authorRuss Allbery <rra@stanford.edu>
Sat, 22 Aug 2009 01:59:01 +0000 (18:59 -0700)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 10 Sep 2009 12:46:40 +0000 (05:46 -0700)
acinclude.m4 was adding to afsconfig.h some code to define sig_t as the
type of a signal handler.  This definition was in terms of RETSIGTYPE,
which is deprecated by Autoconf.  It also adds an unnecessary abstraction
for only two places in the AFS source code where it was used.  Remove it
and change those two spots to use the standard C declaration of the
function pointer.

Reviewed-on: http://gerrit.openafs.org/335
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
acinclude.m4
src/kauth/user.c
src/sys/pioctl.c

index ff33b72b6e2ef09e420a623255843a7b182cff10..84423ec86495019acab4cea6b345601f0f0f8ca6 100644 (file)
@@ -1603,13 +1603,6 @@ AC_CHECK_TYPE(ssize_t, int)
 AC_CHECK_TYPES(sig_t, , ,
   [#include <sys/types.h>
    #include <signal.h> ])
-AH_BOTTOM(
-[#ifndef HAVE_SIG_T
-#ifndef SIG_T_DEFINED
-#define SIG_T_DEFINED
-typedef RETSIGTYPE (*sig_t) ();
-#endif
-#endif])
 AC_CHECK_TYPE([sig_atomic_t], ,
     [AC_DEFINE([sig_atomic_t], [int],
         [Define to int if <signal.h> does not define.])],
index e5c986c75c9e6d21c5f495a1e02c1528677b3436..770742a3a2648139f22c8cf8680ff7ebc63dc59c 100644 (file)
@@ -160,7 +160,7 @@ ka_UserAuthenticateGeneral(afs_int32 flags, char *name, char *instance,
     struct ktc_encryptionKey key;
     afs_int32 code, dosetpag = 0;
 #if !defined(AFS_NT40_ENV) && !defined(AFS_LINUX20_ENV) && !defined(AFS_USR_LINUX20_ENV) && !defined(AFS_XBSD_ENV) || defined(AFS_FBSD_ENV)
-    sig_t old;
+    void (*old)(int);
 #endif
 
     if (reasonP)
index 06c2bccba38581098e8953f6838cad3604cf1673..818b8c0f24428b5e5889be9a76294c55c9ef374d 100644 (file)
@@ -56,7 +56,7 @@ lpioctl(char *path, int cmd, void *cmarg, int follow)
 #ifndef AFS_LINUX20_ENV
     /* As kauth/user.c says, handle smoothly the case where no AFS system call
      * exists (yet). */
-    sig_t old = signal(SIGSYS, SIG_IGN);
+    void (*old)(int) = signal(SIGSYS, SIG_IGN);
 #endif
 
 #if defined(AFS_LINUX20_ENV)