add fgetgrent function
based on patch by Isaac Dunham, moved to its own file to avoid increasing bss on static linked programs not using this nonstandard function but using the standard getgrent function, and vice versa.
This commit is contained in:
parent
b9e08308f4
commit
cac872957e
2 changed files with 13 additions and 0 deletions
9
src/passwd/fgetgrent.c
Normal file
9
src/passwd/fgetgrent.c
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#include "pwf.h"
|
||||
|
||||
struct group *fgetgrent(FILE *f)
|
||||
{
|
||||
static char *line, **mem;
|
||||
static struct group gr;
|
||||
size_t size=0, nmem=0;
|
||||
return __getgrent_a(f, &gr, &line, &size, &mem, &nmem);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue