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:
Rich Felker 2013-02-17 13:21:56 -05:00
commit cac872957e
2 changed files with 13 additions and 0 deletions

9
src/passwd/fgetgrent.c Normal file
View 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);
}