#ifndef __PWD_LOADED #define __PWD_LOADED 1 #pragma __nostandard #include #if __CRTL_VER >= 70000000 /* Only OpenVMS V7.0 or later */ /**************************************************************************** ** ** - Password file access functions ** ***************************************************************************** ** Header introduced by the ISO POSIX-1 Standard ***************************************************************************** ** ** Copyright 2000 Compaq Computer Corporation ** ** Compaq and the Compaq logo Registered in U.S. Patent and Trademark Office. ** ** Confidential computer software. Valid license from Compaq required for ** possession, use or copying. Consistent with FAR 12.211 and 12.212, ** Commercial Computer Software, Computer Software Documentation, and ** Technical Data for Commercial Items are licensed to the U.S. Government ** under vendor's standard commercial license. ** ****************************************************************************** */ #ifdef __cplusplus extern "C" { #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save # pragma __pointer_size 32 #endif /* ** Naturally align data structures */ #pragma __member_alignment __save #pragma __member_alignment /* ** X/Open extensions for types */ #if defined _XOPEN_SOURCE || !defined _POSIX_C_SOURCE # if !defined __UID_T # define __UID_T 1 typedef __uid_t uid_t; # endif # if !defined __GID_T # define __GID_T 1 typedef __gid_t gid_t; # endif #endif /* ** Define the passwd structure ** ** Note that following fields typically appear in UNIX implementations. ** ** char *pw_passwd; ** int pw_quota; ** char *pw_comment; ** char *pw_gecos; ** ** Also note that the following functions are also typically found. ** ** struct passwd *getpwent (void); ** int setpwent (void); ** void endpwent (void); ** void setpwfile (const char *); ** */ struct passwd { char *pw_name; __uid_t pw_uid; __gid_t pw_gid; char *pw_dir; char *pw_shell; }; /* ** Prior to enabling 64 bit pointers, create typedefs for structures which ** are always allocated in 32 bit memory. */ typedef struct passwd * __struct_passwd_ptr32; /* ** When compiling with /POINTER_SIZE, change to long pointers so that ** prototypes reflect the implementation for widened pointers. When not ** using /POINTER_SIZE, the prototypes do not allow for long pointers. */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size 64 #endif /* ** Function prototypes. The second argument to getpwnam is whether it ** should be returned in UNIX format. */ #if __USE_LONG_GID_T # pragma __extern_prefix __save # pragma __extern_prefix "__long_gid_" #endif __struct_passwd_ptr32 getpwuid (__uid_t); #if (defined (_POSIX_C_SOURCE)) || (__CRTL_VER < 70100000) __struct_passwd_ptr32 getpwnam (const char *); #else __struct_passwd_ptr32 getpwnam (const char *, ...); #endif #if __USE_LONG_GID_T # pragma __extern_prefix __restore #endif #if __USE_LONG_GID_T void endpwent (void); __struct_passwd_ptr32 getpwent (void); void setpwent (void); #endif /* ** Restore the users pointer context */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #ifdef __cplusplus } #endif #pragma __member_alignment __restore #endif /* __PWD_LOADED */ #pragma __standard #endif /* __CRTL_VER */