#ifndef __PWD_LOADED #define __PWD_LOADED 1 /* ** Header may contain non-ANSI C extensions. */ #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 2004 Hewlett-Packard Development Company, L.P. ** ** Confidential computer software. Valid license from HP and/or ** its subsidiaries 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. ** ** Neither HP nor any of its subsidiaries shall be liable for technical ** or editorial errors or omissions contained herein. The information ** in this document is provided "as is" without warranty of any kind and ** is subject to change without notice. The warranties for HP products ** are set forth in the express limited warranty statements accompanying ** such products. Nothing herein should be construed as constituting an ** additional warranty. ** ***************************************************************************** */ #ifdef __cplusplus extern "C" { #endif /* ** Naturally align data structure members */ #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 __PASSWD_MEMBERS \ char *pw_name;\ __uid_t pw_uid;\ __gid_t pw_gid;\ char *pw_dir;\ char *pw_shell; #if __INITIAL_POINTER_SIZE # pragma __pointer_size __save #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size 32 #endif typedef struct passwd {__PASSWD_MEMBERS} __passwd; #if __INITIAL_POINTER_SIZE typedef __passwd __passwd32; # pragma __pointer_size 64 typedef struct __passwd64 {__PASSWD_MEMBERS} __passwd64; #endif #if __INITIAL_POINTER_SIZE # pragma __pointer_size 32 typedef __passwd ** __passwd_ptr32_ptr32; typedef __passwd64 *__passwd64_ptr32; #endif typedef __passwd *__passwd_ptr32; #if __INITIAL_POINTER_SIZE # pragma __pointer_size 64 typedef __passwd64 *__passwd64_ptr64, **__passwd64_ptr64_ptr64; #endif typedef __passwd_ptr32 * __passwd_ptr32_ptr64; #if __INITIAL_POINTER_SIZE == 32 # pragma pointer_size __short #endif #define __USE_64BIT_FUNCS (__CRTL_VER >= 70312000 && __INITIAL_POINTER_SIZE == 64) #if __USE_LONG_GID_T || __USE_64BIT_FUNCS # pragma __extern_prefix __save #endif #if __USE_LONG_GID_T # if __USE_64BIT_FUNCS # pragma __extern_prefix "__long_gid___64_" # else # pragma __extern_prefix "__long_gid_" # endif #else # if __USE_64BIT_FUNCS # pragma __extern_prefix "__64_" # endif #endif #if __USE_64BIT_FUNCS __passwd64_ptr32 #else __passwd_ptr32 #endif getpwnam(__const_char_ptr64 #if !defined(_POSIX_C_SOURCE) && __CRTL_VER >= 70100000 , ... #endif ); #if __USE_64BIT_FUNCS __passwd64_ptr32 #else __passwd_ptr32 #endif getpwuid(__uid_t); #if __USE_LONG_GID_T || __USE_64BIT_FUNCS # pragma __extern_prefix __restore #endif #if __USE_LONG_GID_T # pragma __extern_prefix __save # pragma __extern_prefix "__long_gid_" #endif #if __CRTL_VER >= 70312000 # if __INITIAL_POINTER_SIZE __passwd_ptr32 __32_getpwnam(__const_char_ptr64 # if !defined(_POSIX_C_SOURCE) && __CRTL_VER >= 70100000 , ... # endif ); __passwd64_ptr32 __64_getpwnam(__const_char_ptr64 # if !defined(_POSIX_C_SOURCE) && __CRTL_VER >= 70100000 , ... # endif ); __passwd_ptr32 __32_getpwuid(__uid_t); __passwd64_ptr32 __64_getpwuid(__uid_t); # endif int getpwnam_r( # if __INITIAL_POINTER_SIZE == 64 __const_char_ptr64, __passwd64_ptr64, __char_ptr64, __size_t, __passwd64_ptr64_ptr64 # else __const_char_ptr64, __passwd_ptr32, __char_ptr32, __size_t, __passwd_ptr32_ptr64 # endif # if !defined(_POSIX_C_SOURCE) , ... /* Optional extra argument specifies OpenVMS format for pw_dir field */ # endif ); int getpwuid_r(__uid_t uic, # if __INITIAL_POINTER_SIZE == 64 __passwd64_ptr64, __char_ptr64, __size_t, __passwd64_ptr64_ptr64); # else __passwd_ptr32, __char_ptr32, __size_t, __passwd_ptr32_ptr64); # endif # if __INITIAL_POINTER_SIZE # if __USE_LONG_GID_T # pragma __extern_prefix "___long_gid" # endif int _getpwnam_r32(__const_char_ptr64, __passwd_ptr32, __char_ptr32, __size_t, __passwd_ptr32_ptr64 # if !defined(_POSIX_C_SOURCE) , ... # endif ); int _getpwnam_r64(__const_char_ptr64, __passwd64_ptr64, __char_ptr64, __size_t, __passwd64_ptr64_ptr64 # if !defined(_POSIX_C_SOURCE) , ... # endif ); int _getpwuid_r32(__uid_t, __passwd_ptr32, __char_ptr32, __size_t, __passwd_ptr32_ptr64); int _getpwuid_r64(__uid_t, __passwd64_ptr64, __char_ptr64, __size_t, __passwd64_ptr64_ptr64); # endif /* __INITIAL_POINTER_SIZE */ #endif /* __CRTL_VER > 70312000 */ #if __USE_LONG_GID_T # pragma __extern_prefix __restore #endif /* ** getpwent, setpwent, & endpwent were added for OpenVMS V7.2-6C1, and V7.3-1 */ #if __CRTL_VER >= 70301000 # if !__USE_LONG_GID_T || __USE_64BIT_FUNCS # if __CAN_USE_EXTERN_PREFIX # pragma __extern_prefix __save # if __USE_64BIT_FUNCS # if !__USE_LONG_GID_T # pragma __extern_prefix "__short_gid___64_" # else # pragma __extern_prefix "__64_" # endif # else # if !__USE_LONG_GID_T # pragma __extern_prefix "__short_gid_" # endif # endif # else # if __USE_64BIT_FUNCS # if !__USE_LONG_GID_T # define getpwent() __short_gid___64_getpwent() # else # define getpwent() __64_getpwent() # endif # else # if !__USE_LONG_GID_T # define getpwent() __short_gid_getpwent() # endif # endif # endif # endif # if __USE_64BIT_FUNCS __passwd64_ptr32 # else __passwd_ptr32 # endif getpwent(void); # if __CAN_USE_EXTERN_PREFIX && (!__USE_LONG_GID_T || __USE_64BIT_FUNCS) # pragma __extern_prefix __restore # endif # if !__USE_LONG_GID_T # if __CAN_USE_EXTERN_PREFIX # pragma __extern_prefix __save # pragma __extern_prefix "__short_gid_" # else # define __32_getpwent() __short_gid___32_getpwent() # define __64_getpwent() __short_gid___64_getpwent() # endif # endif # if __INITIAL_POINTER_SIZE && __CRTL_VER >= 70312000 __passwd_ptr32 __32_getpwent(void); __passwd64_ptr32 __64_getpwent(void); # endif # if __CAN_USE_EXTERN_PREFIX && !__USE_LONG_GID_T # pragma __extern_prefix __restore # endif void setpwent(void); void endpwent(void); #endif /* __CRTL_VER >= 70301000 */ #if __INITIAL_POINTER_SIZE # pragma __pointer_size __restore #endif #pragma __member_alignment __restore #ifdef __cplusplus } #endif #endif /* __CRTL_VER >= 70000000 */ #pragma __standard #endif /* __PWD_LOADED */