jbuck@epimass.epi.com (Joe Buck) (03/15/88)
I first noticed this when building "perl".
On RTU 3.1 on our 5600, the man page for "getgroups"
claims that the groups array consists of unsigned shorts.
After doing a few experiments, I find that it does not;
I only get consistent results when I pass it an array
of ints or unsigned ints. It's easy to duplicate this;
from an account that is in more than one group, run the
program
main () {
int gary[32];
int i = getgroups(32,gary), j;
for (j = 0; j < i; j++) printf ("%d ", gary[j]);
printf ("\n");
}
The results will be correct. Change the declaration of
gary to "unsigned short" as described in the man page
and the program no longer works.
So what gives?
--
- Joe Buck {uunet,ucbvax,sun,<smart-site>}!epimass.epi.com!jbuck
Old Internet mailers: jbuck%epimass.epi.com@uunet.uu.net