summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>1999-08-10 09:06:42 +0000
committerJarkko Hietaniemi <jhi@iki.fi>1999-08-10 09:06:42 +0000
commitd8eceb896c98708a63dcc63f7bf202b095342359 (patch)
tree9701b08cb03f36f95bdc3bc268845cf99e36dd6f /doio.c
parent1ff81528d9b685c68d4fe91564f636f46d635496 (diff)
downloadperl-d8eceb896c98708a63dcc63f7bf202b095342359.tar.gz
Gratuitous uid and gid casts to I32s and ints removed.
There are still problem spots in printfing such ids: width (%d vs %ld) and signedness %d vs %u. p4raw-id: //depot/cfgperl@3945
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/doio.c b/doio.c
index f13d09f2b2..7620e3adcc 100644
--- a/doio.c
+++ b/doio.c
@@ -1488,7 +1488,8 @@ nothing in the core.
/* Do the permissions allow some operation? Assumes statcache already set. */
#ifndef VMS /* VMS' cando is in vms.c */
I32
-Perl_cando(pTHX_ I32 bit, I32 effective, register struct stat *statbufp)
+Perl_cando(pTHX_ I32 bit, Uid_t effective, register struct stat *statbufp)
+/* Note: we use `effective' both for uids and gids. */
{
#ifdef DOSISH
/* [Comments and code from Len Reed]
@@ -1528,7 +1529,7 @@ Perl_cando(pTHX_ I32 bit, I32 effective, register struct stat *statbufp)
if (statbufp->st_mode & bit)
return TRUE; /* ok as "user" */
}
- else if (ingroup((I32)statbufp->st_gid,effective)) {
+ else if (ingroup(statbufp->st_gid,effective)) {
if (statbufp->st_mode & bit >> 3)
return TRUE; /* ok as "group" */
}
@@ -1539,8 +1540,8 @@ Perl_cando(pTHX_ I32 bit, I32 effective, register struct stat *statbufp)
}
#endif /* ! VMS */
-I32
-Perl_ingroup(pTHX_ I32 testgid, I32 effective)
+bool
+Perl_ingroup(pTHX_ Gid_t testgid, Uid_t effective)
{
if (testgid == (effective ? PL_egid : PL_gid))
return TRUE;