Exemplo n.º 1
0
CAMLprim value unix_getgrgid(value gid)
{
  struct group * entry;
  entry = getgrgid(Int_val(gid));
  if (entry == NULL) caml_raise_not_found();
  return alloc_group_entry(entry);
}
Exemplo n.º 2
0
CAMLprim value unix_getgrnam(value name)
{
  struct group * entry;
  entry = getgrnam(String_val(name));
  if (entry == NULL) raise_not_found();
  return alloc_group_entry(entry);
}
Exemplo n.º 3
0
CAMLprim value unix_getgrnam(value name)
{
  struct group * entry;
  if (! caml_string_is_c_safe(name)) caml_raise_not_found();
  entry = getgrnam(String_val(name));
  if (entry == NULL) caml_raise_not_found();
  return alloc_group_entry(entry);
}