#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 ***************************************************************************** ** ** ** HPE CONFIDENTIAL. This software is confidential proprietary software ** ** licensed by Hewlett Packard Enterprise Development, LP, and is not ** ** authorized to be used, duplicated or disclosed to anyone without the ** ** prior written permission of HPE. ** ** Copyright 2004 Hewlett Packard Enterprise Development, LP ** ** ** ** VMS SOFTWARE, INC. CONFIDENTIAL. This software is confidential ** ** proprietary software licensed by VMS Software, Inc., and is not ** ** authorized to be used, duplicated or disclosed to anyone without ** ** the prior written permission of VMS Software, Inc. ** ** Copyright 2021-2023 VMS Software, Inc. ** ** ** ****************************************************************************/ #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 || defined(__clang__) # pragma __required_pointer_size __save # pragma __required_pointer_size 64 typedef struct __passwd64 {__PASSWD_MEMBERS} __passwd64; # pragma __required_pointer_size 32 typedef struct __passwd32 {__PASSWD_MEMBERS} __passwd32; #endif #if (__INITIAL_POINTER_SIZE || defined(__clang__)) && __CRTL_VER >= 80500000 # define __passwd __passwd32 #else typedef struct passwd {__PASSWD_MEMBERS} __passwd; #endif #if (__INITIAL_POINTER_SIZE || defined(__clang__)) && __CRTL_VER >= 80500000 # if __INITIAL_POINTER_SIZE == 32 # define passwd __passwd32 # else # define passwd __passwd64 # endif #endif #if __INITIAL_POINTER_SIZE || defined(__clang__) typedef __passwd ** __passwd_ptr32_ptr32; typedef __passwd64 *__passwd64_ptr32; #endif typedef __passwd *__passwd_ptr32; #if __INITIAL_POINTER_SIZE || defined(__clang__) # pragma __required_pointer_size 64 typedef __passwd64 *__passwd64_ptr64, **__passwd64_ptr64_ptr64; #endif typedef __passwd_ptr32 * __passwd_ptr32_ptr64; #if __INITIAL_POINTER_SIZE == 32 # pragma __required_pointer_size __short #endif #if (__CRTL_VER >= 70312000 && ((defined(__clang__) && (__INITIAL_POINTER_SIZE != 32)) || (__INITIAL_POINTER_SIZE == 64))) # define __USE_64BIT_FUNCS 1 #endif #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 || defined(__clang__) __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 ((defined(__clang__) && (__INITIAL_POINTER_SIZE != 32)) || (__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 ((defined(__clang__) && (__INITIAL_POINTER_SIZE != 32)) || (__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 || defined(__clang__) # 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 || defined(__clang__)) && __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 || defined(__clang__) # pragma __required_pointer_size __restore #endif #pragma __member_alignment __restore #ifdef __cplusplus } #endif #endif /* __CRTL_VER >= 70000000 */ #pragma __standard #endif /* __PWD_LOADED */