#include <unistd.h>
#endif
-#if defined(HAVE_STDLIB_H)
-#include <stdlib.h>
-#endif
-
#include <sys/types.h>
#include <stdio.h>
#include <unistd.h>
if (sizeof(gid_t) == sizeof(int)) {
fprintf(stderr,"gid_t and int are the same size\n");
- return 1;
+ exit(1);
}
if (ngroups <= 0)
if (ngroups == 0) {
printf("WARNING: can't determine getgroups return type\n");
- return 1;
+ exit(1);
}
cgroups = (char *)igroups;
if (ngroups == 1 &&
cgroups[2] == 0x42 && cgroups[3] == 0x42) {
fprintf(stderr,"getgroups returns gid_t\n");
- return 1;
+ exit(1);
}
for (i=0;i<ngroups;i++) {
if (igroups[i] == 0x42424242) {
fprintf(stderr,"getgroups returns gid_t\n");
- return 1;
+ exit(1);
}
}
- return 0;
+ exit(0);
}