diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-10 09:06:42 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-10 09:06:42 +0000 |
commit | d8eceb896c98708a63dcc63f7bf202b095342359 (patch) | |
tree | 9701b08cb03f36f95bdc3bc268845cf99e36dd6f /doio.c | |
parent | 1ff81528d9b685c68d4fe91564f636f46d635496 (diff) | |
download | perl-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.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; |