summaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-11-03 00:59:09 +0000
committerRoland McGrath <roland@gnu.org>2002-11-03 00:59:09 +0000
commit05dab910b0032cab151f3c4507dc04100b1c2ce0 (patch)
treec2e532dc6b4876cd1950eef568f5be6477a57487 /manual
parent379c9e03af51b7b98aec1f9b04f8f22dec5d4711 (diff)
* 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 <jakub@redhat.com> * 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 <drow@mvista.com> * crypt/crypt_util.c (__init_des_r): Initialize current_salt and current_saltbits. 2002-11-02 Roland McGrath <roland@redhat.com>
Diffstat (limited to 'manual')
-rw-r--r--manual/filesys.texi14
1 files changed, 5 insertions, 9 deletions
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