From be1a675dcc7968c6fe10b42fcae85b1e49a5af3c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 1 Aug 2009 12:31:36 -0400 Subject: [PATCH] Make Windows pioctl prototypes consistent with Unix 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 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- src/sys/pioctl_nt.c | 12 ++++++------ src/sys/pioctl_nt.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sys/pioctl_nt.c b/src/sys/pioctl_nt.c index 76d7cbf..db2acf3 100644 --- a/src/sys/pioctl_nt.c +++ b/src/sys/pioctl_nt.c @@ -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); } diff --git a/src/sys/pioctl_nt.h b/src/sys/pioctl_nt.h index d84cfe7..2bbb074 100644 --- a/src/sys/pioctl_nt.h +++ b/src/sys/pioctl_nt.h @@ -25,10 +25,10 @@ typedef struct ViceIoctl { /* Fake error code since NT errno.h doesn't define it */ #include -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 */ -- 1.9.4