mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
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 <sxw@inf.ed.ac.uk> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
d6df1a8cec
commit
d96ec9ec03
@ -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.])],
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user