Make Windows pioctl prototypes consistent with Unix
authorJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 1 Aug 2009 16:31:36 +0000 (12:31 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Thu, 6 Aug 2009 04:48:52 +0000 (21:48 -0700)
The Windows pioctl prototypes differed from those now exported
by sys/sys_prototypes.h.  This produced undesirable warnings.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/260
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

src/sys/pioctl_nt.c
src/sys/pioctl_nt.h

index 76d7cbf..db2acf3 100644 (file)
@@ -1186,8 +1186,8 @@ fs_GetFullPath(char *pathp, char *outPathp, long outSize)
     return 0;
 }
 
-static long
-pioctl_int(char *pathp, long opcode, struct ViceIoctl *blobp, int follow, int is_utf8)
+static int
+pioctl_int(char *pathp, afs_int32 opcode, struct ViceIoctl *blobp, afs_int32 follow, afs_int32 is_utf8)
 {
     fs_ioctlRequest_t preq;
     long code;
@@ -1274,14 +1274,14 @@ pioctl_int(char *pathp, long opcode, struct ViceIoctl *blobp, int follow, int is
     return 0;
 }
 
-long
-pioctl_utf8(char * pathp, long opcode, struct ViceIoctl * blobp, int follow)
+int
+pioctl_utf8(char * pathp, afs_int32 opcode, struct ViceIoctl * blobp, afs_int32 follow)
 {
     return pioctl_int(pathp, opcode, blobp, follow, TRUE);
 }
 
-long
-pioctl(char * pathp, long opcode, struct ViceIoctl * blobp, int follow)
+int
+pioctl(char * pathp, afs_int32 opcode, struct ViceIoctl * blobp, afs_int32 follow)
 {
     return pioctl_int(pathp, opcode, blobp, follow, FALSE);
 }
index d84cfe7..2bbb074 100644 (file)
@@ -25,10 +25,10 @@ typedef struct ViceIoctl {
 /* Fake error code since NT errno.h doesn't define it */
 #include <afs/errmap_nt.h>
 
-extern long pioctl(char *pathp, long opcode, struct ViceIoctl *blob,
-                  int follow);
+extern int pioctl(char *pathp, afs_int32 opcode, struct ViceIoctl *blob,
+                 afs_int32 follow);
 
-extern long pioctl_utf8(char *pathp, long opcode, struct ViceIoctl *blob,
-                        int follow);
+extern int pioctl_utf8(char *pathp, afs_int32 opcode, struct ViceIoctl *blob,
+                       afs_int32 follow);
 
 #endif /* OPENAFS_AFS_PIOCTL_H */