Open System Services Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)

OSS Library Calls (n - r) readdir_r(3)
number 255.
NOTES
On systems running H-series RVUs earlier than H06.21, J-series RVUs earlier than J06.10, or
G-series RVUs (native OSS processes only), follow the instructions for using the Standard
POSIX Threads library.
On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use
either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded
applications.
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use |
this function with 32-bit applications or 64-bit applications unless you are using the Standard |
POSIX Threads Library.
If you are NOT using the Standard POSIX Threads Library (this is not a threaded application or
you are using the POSIX User Thread Model Library), you must:
Include the dirent.h header file
If you are using the Standard POSIX Threads library, you must:
Include the spthread.h header file
Link your application to:
/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
If you are using this function in a threaded application on a system running H06.21 or a later H- |
series RVU or J06.10 or a later J-series RVU, or in a 64-bit application on a system running |
H06.24 or a later H-series RVU or J06.13 or a later J-series RVU, you might need to include |
additional files or use additional macros. For more information about threaded and 64-bit appli- |
cations in the OSS environment, see the Open System Services Programmers Guide.
RETURN VALUES
Upon successful completion, the readdir_r( ) function returns the value 0 (zero). Otherwise, a
nonzero error number is returned, and errno is set to indicate the error. For the possible values
that can be returned, see the ERRORS subsection of this reference page.
ERRORS
If any of these conditions occur, the readdir_r( ) function sets errno to the corresponding value:
[EBADF] The dirp parameter does not point to a valid directory structure open for reading.
[EFAULT] The dirp parameter does not point to a valid directory structure open for reading.
[EINVAL] One of these conditions occured:
Table overflow occurred after the last valid telldir( ) function call for a
Guardian disk volume or subvolume. Only the last 128 values returned
by the telldir( ) function can be saved in the table.
Either the ret or the result parameter is NULL.
527187-017 Hewlett-Packard Company 5149