home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / radi116c.zip / radius116c / src / radius / pwd.unx < prev    next >
Text File  |  1997-01-29  |  2KB  |  105 lines

  1. /* @(#) $Revision: 66.4 $ */
  2. #ifndef _PWD_INCLUDED /* allow multiple inclusions */
  3. #define _PWD_INCLUDED
  4.  
  5. #ifndef _SYS_STDSYMS_INCLUDED
  6. #  include <sys/stdsyms.h>
  7. #endif /* _SYS_STDSYMS_INCLUDED */
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. #ifdef _INCLUDE_POSIX_SOURCE
  14.  
  15. #  ifndef _GID_T
  16. #    define _GID_T
  17.      typedef long gid_t;
  18. #  endif /* _GID_T */
  19.  
  20. #  ifndef _UID_T
  21. #    define _UID_T
  22.      typedef long uid_t;
  23. #  endif /* _UID_T */
  24.  
  25.    struct passwd {
  26.     char    *pw_name;
  27.     char     *pw_passwd;
  28. #ifdef _CLASSIC_ID_TYPES
  29.     int    pw_uid;
  30.     int    pw_gid;
  31. #else
  32.     uid_t    pw_uid;
  33.     gid_t    pw_gid;
  34. #endif
  35.     char     *pw_age;
  36.     char    *pw_comment;
  37.     char    *pw_gecos;
  38.     char    *pw_dir;
  39.     char    *pw_shell;
  40.     long    pw_audid;
  41.     int    pw_audflg;
  42.    };
  43.  
  44. #  if defined(__STDC__) || defined(__cplusplus)
  45.      extern struct passwd *getpwuid(uid_t);
  46.      extern struct passwd *getpwnam(const char *);
  47. #  else /* __STDC__ || __cplusplus */
  48.      extern struct passwd *getpwuid();
  49.      extern struct passwd *getpwnam();
  50. #  endif /* __STDC__ || __cplusplus */
  51. #endif /* _INCLUDE_POSIX_SOURCE */
  52.  
  53. #ifdef _INCLUDE_HPUX_SOURCE
  54.    struct s_passwd {
  55.        char    *pw_name;
  56.        char    *pw_passwd;
  57.        char    *pw_age;
  58.        long     pw_audid;
  59.        int     pw_audflg;
  60.    };
  61.  
  62.    struct comment {
  63.     char    *c_dept;
  64.     char    *c_name;
  65.     char    *c_acct;
  66.     char    *c_bin;
  67.    };
  68.  
  69. #  if defined(__STDC__) || defined(__cplusplus)
  70. #    ifndef _STDIO_INCLUDED
  71. #      include <stdio.h>
  72. #    endif /* _STDIO_INCLUDED */
  73.  
  74.      extern void setpwent(void);
  75.      extern void endpwent(void);
  76.      extern struct passwd *getpwent(void);
  77.      extern struct passwd *fgetpwent(FILE *);
  78.      extern struct s_passwd *getspwent(void);
  79.      extern struct s_passwd *getspwuid(int);
  80.      extern struct s_passwd *getspwaid(int);
  81.      extern struct s_passwd *getspwnam(char *);
  82.      extern struct s_passwd *fgetspwent(FILE *);
  83. #  else /* __STDC__ || __cplusplus */
  84.      extern void setpwent();
  85.      extern void endpwent();
  86.      extern struct passwd *getpwent();
  87.      extern struct passwd *fgetpwent();
  88.      extern struct s_passwd *getspwent();
  89.      extern struct s_passwd *getspwuid();
  90.      extern struct s_passwd *getspwaid();
  91.      extern struct s_passwd *getspwnam();
  92.      extern struct s_passwd *fgetspwent();
  93. #  endif /* __STDC__ || __cplusplus */
  94.  
  95. #  ifndef UID_NOBODY        /* Uid of NFS "nobody". */
  96. #     define UID_NOBODY ((unsigned short) 0xfffe)
  97. #  endif
  98. #endif /* _INCLUDE_HPUX_SOURCE */
  99.  
  100. #ifdef __cplusplus
  101. }
  102. #endif
  103.  
  104. #endif /* _PWD_INCLUDED */
  105.