/*
 * The <pwd.h> header defines the items in the password file.
 *
 *  This is not really supported on QDOS, but we have this
 *  header for compatibility with Unix systems
 *
 *  AMENDMENT HISTORY
 *  ~~~~~~~~~~~~~~~~~
 *  19 Feb 94   DJW   - First version
 */

#ifndef _PWD_H
#define _PWD_H

#ifndef _TYPES_H
#include <sys/types.h>
#endif

struct passwd {
  char *    pw_name;    /* login name */
  uid_t     pw_uid;     /* uid corresponding to the name */
  gid_t     pw_gid;     /* gid corresponding to the name */
  char *    pw_dir;     /* user's home directory */
  char *    pw_shell;   /* name of the user's shell */

  /* The following members are not defined by POSIX. */
  char *pw_passwd;		/* password information */
  char *pw_gecos;		/* just in case you have a GE 645 around */
};


/*
 *  Function Prototypes.
 */

#ifdef __STDC__
#define _P_(params) params
#else
#define _P_(params) ()
#endif

/*  Posix mandated routines */
 
struct passwd * getpwnam    _P_((const char *));
struct passwd * getpwuid    _P_((int));

/*  Unix compatible routines */

void            endpwent    _P_((void));
struct passwd * getpwent    _P_((void));
void            setpwent    _P_((void));

#ifdef _LIBRARY_
/*************************************************************************
 *
 *                          C A U T I O N
 *                          ~~~~~~~~~~~~~
 *
 *  The remainder of this header contains definitions that are internal
 *  to the way that the C68 libraries have been implemented on QDOS/SMS.
 *  These definitions should not be used by any user program as they are
 *  subject to change without notice.
 *
 *************************************************************************/

#endif /* _LIBRARY_ */
       
#undef _P_

#endif /* _PWD_H */

