Last change
on this file since 389 was 389, checked in by coas-nagasima, 5 years ago |
ビルドが通るよう更新
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-csrc;charset=UTF-8
|
File size:
347 bytes
|
Rev | Line | |
---|
[388] | 1 | #include "pwf.h"
|
---|
| 2 | #include <pthread.h>
|
---|
| 3 |
|
---|
| 4 | struct spwd *fgetspent(FILE *f)
|
---|
| 5 | {
|
---|
| 6 | static char *line;
|
---|
| 7 | static struct spwd sp;
|
---|
| 8 | size_t size = 0;
|
---|
| 9 | struct spwd *res = 0;
|
---|
| 10 | int cs;
|
---|
| 11 | pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &cs);
|
---|
| 12 | if (getline(&line, &size, f) >= 0 && __parsespent(line, &sp) >= 0) res = &sp;
|
---|
| 13 | pthread_setcancelstate(cs, 0);
|
---|
| 14 | return res;
|
---|
| 15 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.