From 325081b9eb2035f8f025255206889208f330b590 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 18 May 2020 17:41:25 -0300 Subject: string: Add strerrorname_np and strerrordesc_np The strerrorname_np returns error number name (e.g. "EINVAL" for EINVAL) while strerrordesc_np returns string describing error number (e.g "Invalid argument" for EINVAL). Different than strerror, strerrordesc_np does not attempt to translate the return description, both functions return NULL for an invalid error number. They should be used instead of sys_errlist and sys_nerr, 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. Tested-by: Carlos O'Donell Reviewed-by: Carlos O'Donell --- sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist | 2 ++ sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist | 2 ++ 2 files changed, 4 insertions(+) (limited to 'sysdeps/unix/sysv/linux/powerpc/powerpc32') diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist index 34a84b4eb9..1d0158a08e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@ -2201,6 +2201,8 @@ GLIBC_2.32 pthread_getattr_np F GLIBC_2.32 pthread_sigmask F GLIBC_2.32 sigabbrev_np F GLIBC_2.32 sigdescr_np F +GLIBC_2.32 strerrordesc_np F +GLIBC_2.32 strerrorname_np F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist index 2caf08d819..f65772cf8a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@ -2234,6 +2234,8 @@ GLIBC_2.32 pthread_getattr_np F GLIBC_2.32 pthread_sigmask F GLIBC_2.32 sigabbrev_np F GLIBC_2.32 sigdescr_np F +GLIBC_2.32 strerrordesc_np F +GLIBC_2.32 strerrorname_np F GLIBC_2.4 _IO_fprintf F GLIBC_2.4 _IO_printf F GLIBC_2.4 _IO_sprintf F -- cgit 1.4.1