aix51-32bit-ioctl-glue-20020107
authorHartmut Reuter <reuter@rzg.mpg.de>
Tue, 7 Jan 2003 23:14:08 +0000 (23:14 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 7 Jan 2003 23:14:08 +0000 (23:14 +0000)
support both 64bit and 32bit ioctls on aix 5.1

src/afs/afs_pioctl.c

index a344e1f..ed26f1a 100644 (file)
@@ -371,7 +371,6 @@ afs_ioctl(OSI_VN_DECL(tvc), int cmd, void * arg, int flag, cred_t *cr, rval_t *r
 }
 #endif /* AFS_SGI_ENV */
 
-
 /* unlike most calls here, this one uses u.u_error to return error conditions,
    since this is really an intercepted chapter 2 call, rather than a vnode
    interface call.
@@ -381,7 +380,11 @@ afs_ioctl(OSI_VN_DECL(tvc), int cmd, void * arg, int flag, cred_t *cr, rval_t *r
 #if !defined(AFS_SGI_ENV)
 #ifdef AFS_AIX32_ENV
 #ifdef AFS_AIX51_ENV
+#ifdef __64BIT__
 kioctl(fdes, com, arg, ext, arg2, arg3)
+#else /* __64BIT__ */
+kioctl32(fdes, com, arg, ext, arg2, arg3)
+#endif /* __64BIT__ */
      caddr_t arg2, arg3;
 #else
 kioctl(fdes, com, arg, ext)
@@ -614,12 +617,16 @@ int afs_xioctl (void)
 #ifdef AFS_AIX41_ENV
        ufdrele(uap->fd);
 #ifdef AFS_AIX51_ENV
+#ifdef __64BIT__
        code = okioctl(fdes, com, arg, ext, arg2, arg3);
-#else
+#else /* __64BIT__ */
+       code = okioctl32(fdes, com, arg, ext, arg2, arg3);
+#endif /* __64BIT__ */
+#else /* !AFS_AIX51_ENV */
        code = okioctl(fdes, com, arg, ext);
-#endif
+#endif /* AFS_AIX51_ENV */
        return code;
-#else
+#else /* !AFS_AIX41_ENV */
 #ifdef AFS_AIX32_ENV
        okioctl(fdes, com, arg, ext);
 #elif defined(AFS_SUN5_ENV)