]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Describe new error codes and strerror_r function.
authorUlrich Drepper <drepper@redhat.com>
Sat, 5 Apr 1997 00:46:39 +0000 (00:46 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 5 Apr 1997 00:46:39 +0000 (00:46 +0000)
manual/errno.texi

index e346dd5f1f0b4fa2fb93fefe88b63fcb7515a7d9..bba820869eda48b0b03da6fc6e45480bc834d239 100644 (file)
@@ -1186,6 +1186,18 @@ They are not yet documented.}
 @comment errno ???/121
 @end deftypevr
 
+@comment errno.h
+@comment Linux???: No medium found
+@deftypevr Macro int ENOMEDIUM
+@comment errno ???/???
+@end deftypevr
+
+@comment errno.h
+@comment Linux???: Wrong medium type
+@deftypevr Macro int EMEDIUMTYPE
+@comment errno ???/???
+@end deftypevr
+
 @node Error Messages,  , Error Codes, Error Reporting
 @section Error Messages
 
@@ -1214,6 +1226,25 @@ overwritten.  (But it's guaranteed that no library function ever calls
 The function @code{strerror} is declared in @file{string.h}.
 @end deftypefun
 
+@comment string.h
+@comment GNU
+@deftypefun {char *} strerror_r (int @var{errnum}, char *@var{buf}, size_t @var{n})
+The @code{strerror_r} function works like @code{strerror} but instead of
+returning the error message in a statically allocated buffer shared by
+all threads in the process, it writes the message string in the user
+supplied buffer starting at @var{buf} with the length of @var{n} bytes.
+
+At most @var{n} characters are written (including the NUL byte) so it is
+up to the user to select the buffer large enough.
+
+This function should always be used in multi-threaded programs since
+there is no way to guarantee the string returned by @code{strerror}
+really belongs to the last call of the current thread.
+
+This function @code{strerror_r} is a GNU extension and it is declared in
+@file{string.h}.
+@end deftypefun
+
 @comment stdio.h
 @comment ISO
 @deftypefun void perror (const char *@var{message})