summary refs log tree commit diff
path: root/manual/errno.texi
diff options
context:
space:
mode:
Diffstat (limited to 'manual/errno.texi')
-rw-r--r--manual/errno.texi31
1 files changed, 31 insertions, 0 deletions
diff --git a/manual/errno.texi b/manual/errno.texi
index e346dd5f1f..bba820869e 100644
--- a/manual/errno.texi
+++ b/manual/errno.texi
@@ -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})