+2024-07-20 Bruno Haible <bruno@clisp.org>
+
+ getpayload*: Do use glibc's implementation when it works.
+ Reported by Andreas K. Huettel <dilfridge@gentoo.org> in
+ <https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00206.html>.
+ * m4/getpayload.m4 (gl_FUNC_GETPAYLOADF, gl_FUNC_GETPAYLOAD,
+ gl_FUNC_GETPAYLOADL): Link the test program with -lm if needed.
+
2024-07-15 Paul Eggert <eggert@cs.ucla.edu>
strnlen: port to Android 5.0 (API 21)
# getpayload.m4
-# serial 1
+# serial 2
dnl Copyright 2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl see <https://sourceware.org/bugzilla/show_bug.cgi?id=26073>.
AC_CACHE_CHECK([whether getpayloadf works],
[gl_cv_func_getpayloadf_works],
- [AC_RUN_IFELSE(
+ [
+ saved_LIBS="$LIBS"
+ if test $gl_cv_func_getpayloadf_no_libm != yes; then
+ LIBS="$LIBS -lm"
+ fi
+ AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <math.h>
]],
*) gl_cv_func_getpayloadf_works="guessing yes" ;;
esac
])
+ LIBS="$saved_LIBS"
])
case "$gl_cv_func_getpayloadf_works" in
*yes) ;;
dnl see <https://sourceware.org/bugzilla/show_bug.cgi?id=26073>.
AC_CACHE_CHECK([whether getpayload works],
[gl_cv_func_getpayload_works],
- [AC_RUN_IFELSE(
+ [
+ saved_LIBS="$LIBS"
+ if test $gl_cv_func_getpayload_no_libm != yes; then
+ LIBS="$LIBS -lm"
+ fi
+ AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <math.h>
]],
*) gl_cv_func_getpayload_works="guessing yes" ;;
esac
])
+ LIBS="$saved_LIBS"
])
case "$gl_cv_func_getpayload_works" in
*yes) ;;
dnl see <https://sourceware.org/bugzilla/show_bug.cgi?id=26073>.
AC_CACHE_CHECK([whether getpayloadl works],
[gl_cv_func_getpayloadl_works],
- [AC_RUN_IFELSE(
+ [
+ saved_LIBS="$LIBS"
+ if test $gl_cv_func_getpayloadl_no_libm != yes; then
+ LIBS="$LIBS -lm"
+ fi
+ AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <math.h>
]],
*) gl_cv_func_getpayloadl_works="guessing yes" ;;
esac
])
+ LIBS="$saved_LIBS"
])
case "$gl_cv_func_getpayloadl_works" in
*yes) ;;