Back to index

glibc  2.9
getgroups.c File Reference
#include <sys/types.h>
#include <unistd.h>
#include <limits.h>
#include <alloca.h>

Go to the source code of this file.


int __sco_getgroups (int size, unsigned short int *list)
int __getgroups (int size, gid_t *list)

Function Documentation

int __getgroups ( int  size,
gid_t list 

Definition at line 27 of file getgroups.c.

  int i;
  unsigned short int *shortlist;

  if (size <= 0)
    return __sco_getgroups (size, NULL);

  shortlist = __alloca (size * sizeof (*shortlist));

  size = __sco_getgroups (size, shortlist);
  for (i = 0; i < size; ++i)
    list[i] = shortlist[i];

  return size;

Here is the call graph for this function:

int __sco_getgroups ( int  size,
unsigned short int list 

Here is the caller graph for this function: