Hash :
ae23caf4
Author :
Date :
2016-10-16T22:11:32
qsort_r: Fix macrology for platforms that lack the function. * m4/stdlib_h.m4 (gl_STDLIB_H): Check for qsort_r. (gl_STDLIB_H_DEFAULTS): Initialize HAVE_QSORT_R. * modules/stdlib (Makefile.am): Substitute HAVE_QSORT_R. * lib/stdlib.in.h (qsort_r): Provide declaration if the function does not exist. * m4/qsort_r.m4 (gl_FUNC_QSORT_R): Use AC_CHECK_FUNCS to test whether the function exists. * modules/qsort_r: Add comments.
Description:
Reentrant sort function with GNU signature
Files:
lib/qsort.c
lib/qsort_r.c
m4/qsort_r.m4
Depends-on:
extensions
stdlib
configure.ac:
gl_FUNC_QSORT_R
if test $HAVE_QSORT_R = 0; then
# The function is missing from the system or has an unknown signature.
AC_LIBOBJ([qsort])
elif test $REPLACE_QSORT_R = 1; then
# The function exists, but it has the BSD signature.
AC_LIBOBJ([qsort_r])
fi
gl_STDLIB_MODULE_INDICATOR([qsort_r])
Makefile.am:
Include:
<stdlib.h>
License:
LGPLv2+
Maintainer:
Paul Eggert