From 05dab910b0032cab151f3c4507dc04100b1c2ce0 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 3 Nov 2002 00:59:09 +0000 Subject: * manual/filesys.texi (Reading/Closing Directory): Rewrite readdir_r description to be clearer and to say that *RESULT is set to ENTRY. 2002-10-30 Jakub Jelinek * posix/regexec.c (build_trtable): Alloca or malloc dests_node and dests_ch arrays together. Alloca or malloc dest_states, dest_states_word and dest_states_nl arrays together. Free memory on error exit. 2002-10-29 Daniel Jacobowitz * crypt/crypt_util.c (__init_des_r): Initialize current_salt and current_saltbits. 2002-11-02 Roland McGrath --- manual/filesys.texi | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'manual') diff --git a/manual/filesys.texi b/manual/filesys.texi index 8aeea93f1d..be1ba79ddb 100644 --- a/manual/filesys.texi +++ b/manual/filesys.texi @@ -418,15 +418,11 @@ prevent conflicts between simultaneously running threads the result is not stored in statically allocated memory. Instead the argument @var{entry} points to a place to store the result. -The return value is @code{0} in case the next entry was read -successfully. In this case a pointer to the result is returned in -*@var{result}. It is not required that *@var{result} is the same as -@var{entry}. If something goes wrong while executing @code{readdir_r} -the function returns a value indicating the error (as described for -@code{readdir}). - -If there are no more directory entries, @code{readdir_r}'s return value is -@code{0}, and *@var{result} is set to @code{NULL}. +Normally @code{readdir_r} returns zero and sets @code{*@var{result}} +to @var{entry}. If there are no more entries in the directory or an +error is detected, @code{readdir_r} sets @code{*@var{result}} to a +null pointer and returns a nonzero error code, also stored in +@code{errno}, as described for @code{readdir}. @strong{Portability Note:} On some systems @code{readdir_r} may not return a NUL terminated string for the file name, even when there is no -- cgit 1.4.1