From 8c2d8964c23e808fb62e41fa730b860d0e72d148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Groenvall?= Date: Mon, 10 Jul 1995 22:12:42 +0000 Subject: [PATCH] Fix for horror _AIX git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@29 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/kafs/afssys.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/kafs/afssys.c b/lib/kafs/afssys.c index f15ac91af..37a77156f 100644 --- a/lib/kafs/afssys.c +++ b/lib/kafs/afssys.c @@ -119,7 +119,8 @@ k_afsklog(char *realm) #define SINGLE_ENTRY_POINT 1 #define MULTIPLE_ENTRY_POINT 2 #define SINGLE_ENTRY_POINT2 3 -#define UNKNOWN_ENTRY_POINT 4 +#define AIX_ENTRY_POINTS 4 +#define UNKNOWN_ENTRY_POINT 5 static int afs_entry_point = UNKNOWN_ENTRY_POINT; int @@ -146,6 +147,10 @@ k_pioctl(char *a_path, a_path, o_opcode, a_paramsP, a_followSymlinks); #endif +#ifdef _AIX + return lpioctl(a_path, o_opcode, a_paramsP, a_followSymlinks); +#endif + errno = ENOSYS; kill(getpid(), SIGSYS); /* You loose! */ return -1; @@ -177,6 +182,10 @@ k_setpag(void) return syscall(AFS_SYSCALL2, AFSCALL_SETPAG); #endif +#ifdef _AIX + return lsetpag(); +#endif + errno = ENOSYS; kill(getpid(), SIGSYS); /* You loose! */ return -1; @@ -254,6 +263,18 @@ k_hasafs(void) } #endif /* AFS_SYSCALL */ +#ifdef _AIX + if (setjmp(catch_SIGSYS) == 0) + { + lpioctl(0, 0, 0, 0); + if (errno == EINVAL) + { + afs_entry_point = AIX_ENTRY_POINTS; + goto done; + } + } +#endif + done: (void) signal(SIGSYS, saved_func); errno = saved_errno;