Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
getpwuid_r(3) OSS Library Calls Reference Manual
• Include the spthread.h header file
• Link your application to the Standard POSIX Threads Library:
/G/system/sysnn/zsptsrl (G-series)
or
/G/system/zdllnnn/zsptdll (H-series or J-series)
• Compile your application using the #define _SPT_MODEL_ macro or an equivalent
compiler command option
For more information about threaded and 64-bit applications in the OSS environment, see the |
Open System Services Programmer’s Guide.
RETURN VALUES
Upon successful completion, the getpwuid_r( ) function returns a 0 (zero). Otherwise, a nonzero
error number is returned and the function sets errno to indicate the specific error.
ERRORS
If any of these conditions occur, the getpwuid_r( ) function sets errno to the corresponding
value:
[EAGAIN] A system resource is temporarily unavailable. The function cannot allocate
sufficient heap space to complete the call.
[EINVAL] The value specified for the uid parameter is outside the range of valid values for
user IDs or cannot be passed in the call for other reasons.
[EIO] A disk process or file system input or output error occurred. Data might have
been lost during the transfer.
[ENOCRE] The calling process does not use the Common Run-Time Environment (CRE)
but requested a service that requires CRE (the static area cannot be allocated in
the calling process).
[ENOENT] The specified user ID does not exist, or the uid parameter contains an empty
string.
[ENOMEM] There is insufficient user memory to complete the call.
[ERANGE] Insufficient storage was supplied via buffer and buflen to contain the data to be
referenced by the resulting passwd structure.
RELATED INFORMATION
Functions: endpwent(3), getpwent(3), getpwent_r(3), getpwnam(3), getpwnam_r(3),
getpwuid(3), setpwent(3).
STANDARDS CONFORMANCE
H06.21 and later H-series RVUs, J06.10 and later J-series RVUs
This function conforms to IEEE Std 1003.1 2004, POSIX System Application Program Interface.
The HP implementation of this function does not return these errno values because these condi-
tions cannot occur:
• [EINTR], [EMFILE], or [ENFILE]
The following are HP extensions to the standard:
• The errno values [EAGAIN], [EINVAL], [ENOCRE], [ENOENT], and [ENOMEM] can
be returned.
3−132 Hewlett-Packard Company 527187-017