提交 5e9314ff 编写于 作者: R Rich Felker

add fgetpwent (nonstandard function)

based on patch by Jeremy Huntwork
上级 4619901e
......@@ -9,6 +9,10 @@ extern "C" {
#define __NEED_uid_t
#define __NEED_gid_t
#ifdef _GNU_SOURCE
#define __NEED_FILE
#endif
#include <bits/alltypes.h>
struct passwd
......@@ -33,6 +37,7 @@ int getpwnam_r (const char *, struct passwd *, char *, size_t, struct passwd **)
#ifdef _GNU_SOURCE
char *getpass(const char *);
struct passwd *fgetpwent(FILE *);
#endif
#ifdef __cplusplus
......
#include "pwf.h"
struct passwd *fgetpwent(FILE *f)
{
static char *line;
static struct passwd pw;
size_t size=0;
return __getpwent_a(f, &pw, &line, &size);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册