From cac872957e8c9e3fc13904c1c55eee0253ec1382 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 17 Feb 2013 13:21:56 -0500 Subject: 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. --- src/passwd/fgetgrent.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/passwd/fgetgrent.c (limited to 'src') diff --git a/src/passwd/fgetgrent.c b/src/passwd/fgetgrent.c new file mode 100644 index 00000000..2f18d925 --- /dev/null +++ b/src/passwd/fgetgrent.c @@ -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); +} -- cgit v1.2.1