From d96ec9ec031d0d15d1cfe3b86e58c12c4c267c00 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 21 Aug 2009 18:59:01 -0700 Subject: [PATCH] Stop using sig_t 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 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear --- acinclude.m4 | 7 ------- src/kauth/user.c | 2 +- src/sys/pioctl.c | 2 +- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index ff33b72b6e..84423ec864 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1603,13 +1603,6 @@ AC_CHECK_TYPE(ssize_t, int) AC_CHECK_TYPES(sig_t, , , [#include #include ]) -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 does not define.])], diff --git a/src/kauth/user.c b/src/kauth/user.c index e5c986c75c..770742a3a2 100644 --- a/src/kauth/user.c +++ b/src/kauth/user.c @@ -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) diff --git a/src/sys/pioctl.c b/src/sys/pioctl.c index 06c2bccba3..818b8c0f24 100644 --- a/src/sys/pioctl.c +++ b/src/sys/pioctl.c @@ -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)