summaryrefslogtreecommitdiff
path: root/include/stdio.h
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-05-18 17:41:25 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2020-06-19 10:36:21 -0300
commit59f17be00b48eadc9ad791788235f8be7c9b4c20 (patch)
treec82f04750f39699a8573b005f05db0915b6f42eb /include/stdio.h
parent6e443c2d7fad5de3e15f55ef479973c7a8655796 (diff)
downloadglibc-59f17be00b48eadc9ad791788235f8be7c9b4c20.tar.gz
string: Add strerrorname and strerrordescazanella/sig_err-improvements
The strerrorname returns error number name (i.g. "EINVAL" for EINVAL) while strerrordesc returns string describing error number (i.g "Invalid argument" for EINVAL). Different than strerror, strerrordesc does not attempt to translate the return description and both functions return NULL for an invalid error number. They should be used instead of sys_errlist and sys_nerr and both are thread and async-signal safe. These functions are GNU extensions. Checked on x86-64-linux-gnu, i686-linux-gnu, powerpc64le-linux-gnu, and s390x-linux-gnu.
Diffstat (limited to 'include/stdio.h')
-rw-r--r--include/stdio.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/stdio.h b/include/stdio.h
index 9e3bf6fe42..bc67d020d4 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -187,6 +187,7 @@ libc_hidden_proto (__libc_readline_unlocked);
extern const char *const _sys_errlist_internal[] attribute_hidden;
extern const char *__get_errlist (int) attribute_hidden;
+extern const char *__get_errname (int) attribute_hidden;
libc_hidden_ldbl_proto (__asprintf)