Hash :
d9559536
Author :
Date :
2021-09-08T19:18:37
strerror_r-posix: port even better to Android * lib/strerror_r.c: Use STRERROR_R_CHAR_P to decide whether the system strerror_r returns char *, and HAVE_DECL_STRERROR_R to decide whether it either does that or returns an integer. In the former case, use the system strerror_r even on platforms like Android API level 23 that don’t have __xpg_strerror_r; also check for strerror_r failure just in case. * m4/error.m4 (gl_PREREQ_ERROR): * m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Use system extensions on Android, to avoid mishandling strerror_r on API level 23 and later. * modules/error, modules/strerror_r-posix (configure.ac): Surround gl_PREREQ_ERROR with AS_IF instead of plain if, so that AC_REQUIREs are propagated out.
Description:
strerror_r() function: get string describing error code.
Files:
lib/strerror_r.c
m4/strerror_r.m4
Depends-on:
string
extensions
errno [test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1]
lock [test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1]
strerror-override [test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1]
configure.ac:
gl_FUNC_STRERROR_R
AS_IF([test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1], [
AC_LIBOBJ([strerror_r])
gl_PREREQ_STRERROR_R
])
gl_STRING_MODULE_INDICATOR([strerror_r])
dnl For the modules argp, error.
gl_MODULE_INDICATOR([strerror_r-posix])
Makefile.am:
Include:
<string.h>
License:
LGPLv2+
Maintainer:
all