home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright (c) 1998 The Santa Cruz Operation, Inc.. All Rights Reserved.
- *
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF THE
- * SANTA CRUZ OPERATION INC.
- *
- * The copyright notice above does not evidence any actual or intended
- * publication of such source code.
- */
-
- #ifndef _PWD_H
- #define _PWD_H
- #ident "@(#)sgs-head:common/head/pwd.h 1.3.5.12"
-
- #include <sys/types.h>
-
- struct passwd
- {
- char *pw_name;
- char *pw_passwd;
- uid_t pw_uid;
- gid_t pw_gid;
- char *pw_age;
- char *pw_comment;
- char *pw_gecos;
- char *pw_dir;
- char *pw_shell;
- };
-
- #if !defined(_XOPEN_SOURCE) \
- && !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
-
- struct comment
- {
- char *c_dept;
- char *c_name;
- char *c_acct;
- char *c_bin;
- };
-
- #endif /*!defined(_XOPEN_SOURCE) && ...*/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- struct passwd *getpwuid(uid_t);
- struct passwd *getpwnam(const char *);
-
- #if !defined(_XOPEN_SOURCE) \
- && !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
-
- struct passwd *getpwent(void);
- extern void setpwent(void);
- extern void endpwent(void);
- struct _FILE_;
- struct passwd *fgetpwent(struct _FILE_ *);
- extern int putpwent(const struct passwd *, struct _FILE_ *);
- extern int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
- extern int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
-
- #elif defined(_XOPEN_SOURCE) && _XOPEN_SOURCE_EXTENDED - 0 >= 1
-
- struct passwd *getpwent(void);
- extern void setpwent(void);
- extern void endpwent(void);
-
- #elif _POSIX_C_SOURCE - 0 >= 199506
-
- extern int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
- extern int getpwuid_r(uid_t, struct passwd *, char *, size_t, struct passwd **);
-
- #endif /*!defined(_XOPEN_SOURCE) && ...*/
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /*_PWD_H*/
-