diff options
Diffstat (limited to 'pwd')
-rw-r--r-- | pwd/fgetpwent_r.c | 1 | ||||
-rw-r--r-- | pwd/putpwent.c | 7 | ||||
-rw-r--r-- | pwd/pwd.h | 18 |
3 files changed, 5 insertions, 21 deletions
diff --git a/pwd/fgetpwent_r.c b/pwd/fgetpwent_r.c index 78b491d..4986e74 100644 --- a/pwd/fgetpwent_r.c +++ b/pwd/fgetpwent_r.c @@ -23,6 +23,7 @@ #ifdef USE_IN_LIBIO # define flockfile(s) _IO_flockfile (s) +# define funlockfile(s) _IO_funlockfile (s) #endif /* Define a line parsing function using the common code diff --git a/pwd/putpwent.c b/pwd/putpwent.c index c27f687..7ab48c1 100644 --- a/pwd/putpwent.c +++ b/pwd/putpwent.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1992, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1991, 1992, 1996, 1997, 1998 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -20,6 +20,7 @@ #include <stdio.h> #include <pwd.h> +#define _S(x) x ? x : "" /* Write an entry to the given stream. This must know the format of the password file. */ @@ -35,9 +36,9 @@ putpwent (p, stream) } if (fprintf (stream, "%s:%s:%u:%u:%s:%s:%s\n", - p->pw_name, p->pw_passwd, + p->pw_name, _S (p->pw_passwd), p->pw_uid, p->pw_gid, - p->pw_gecos, p->pw_dir, p->pw_shell) < 0) + _S (p->pw_gecos), _S (p->pw_dir), _S (p->pw_shell)) < 0) return -1; return 0; @@ -64,24 +64,6 @@ struct passwd # include <stdio.h> #endif -#ifdef __USE_GNU -/* Return a new stream open on the password file. */ -extern FILE *__pwdopen __P ((void)); - -/* Read a password entry from STREAM, filling in P. - Return the `struct passwd' of P if successful, NULL on failure. */ -extern struct passwd *__pwdread __P ((FILE *__stream, __ptr_t __p)); - -/* Return a chunk of memory containing pre-initialized data for __pwdread. */ -extern __ptr_t __pwdalloc __P ((void)); - -/* Scan the password file, filling in P, until SELECTOR returns nonzero for - an entry. Return the `struct passwd' of P if successful, NULL on - failure. */ -extern struct passwd *__pwdscan __P ((__ptr_t *__p, - int (*__selector) (struct passwd *))); -#endif - #if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN_EXTENDED /* Rewind the password-file stream. */ |