OSDN Git Service

Fix up breakage resulting from flipping the sense of some defines. Change from
[uclinux-h8/uClibc.git] / include / pwd.h
1 #ifndef __PWD_H
2 #define __PWD_H
3
4 #include <sys/types.h>
5 #include <features.h>
6 #include <stdio.h>
7
8 /* The passwd structure.  */
9 struct passwd
10 {
11   char *pw_name;                /* Username.  */
12   char *pw_passwd;              /* Password.  */
13   uid_t pw_uid;                 /* User ID.  */
14   gid_t pw_gid;                 /* Group ID.  */
15   char *pw_gecos;               /* Real name.  */
16   char *pw_dir;                 /* Home directory.  */
17   char *pw_shell;               /* Shell program.  */
18 };
19
20
21 extern void setpwent __P ((void));
22 extern void endpwent __P ((void));
23 extern struct passwd * getpwent __P ((void));
24
25 extern int putpwent __P ((const struct passwd * __p, FILE * __f));
26 extern int getpw __P ((uid_t uid, char *buf));
27
28 extern struct passwd * fgetpwent __P ((FILE * file));
29
30 extern struct passwd * getpwuid __P ((const uid_t));
31 extern struct passwd * getpwnam __P ((const char *));
32
33
34 extern int getpwent_r __P ((struct passwd *__restrict __resultbuf,
35                             char *__restrict __buffer, size_t __buflen,
36                             struct passwd **__restrict __result));
37 extern int getpwuid_r __P ((uid_t __uid,
38                             struct passwd *__restrict __resultbuf,
39                             char *__restrict __buffer, size_t __buflen,
40                             struct passwd **__restrict __result));
41 extern int getpwnam_r __P ((const char *__restrict __name,
42                             struct passwd *__restrict __resultbuf,
43                             char *__restrict __buffer, size_t __buflen,
44                             struct passwd **__restrict __result));
45 extern int fgetpwent_r __P ((FILE *__restrict __stream,
46                              struct passwd *__restrict __resultbuf,
47                              char *__restrict __buffer, size_t __buflen,
48                              struct passwd **__restrict __result));
49
50 #ifdef __LIBC__
51 /* This is used internally to uClibc */
52 extern int __getpwent_r(struct passwd * passwd, char * line_buff, 
53         size_t buflen, int pwd_fd);
54 #endif
55
56
57 #endif /* pwd.h  */
58
59
60