From 5be04ec2ceb1df77afbca4fcbf9e92a712612d6f Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 16:27:12 +0100 Subject: Sync with the latest Gnulib code (d4ec02b3cc) --- gl/m4/getline.m4 | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'gl/m4/getline.m4') diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4 index 03569f06..36513cd4 100644 --- a/gl/m4/getline.m4 +++ b/gl/m4/getline.m4 @@ -1,6 +1,7 @@ -# getline.m4 serial 30 +# getline.m4 +# serial 33 -dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation, +dnl Copyright (C) 1998-2003, 2005-2007, 2009-2024 Free Software Foundation, dnl Inc. dnl dnl This file is free software; the Free Software Foundation @@ -23,12 +24,9 @@ AC_DEFUN([gl_FUNC_GETLINE], AC_CHECK_DECLS_ONCE([getline]) - gl_getline_needs_run_time_check=no - AC_CHECK_FUNC([getline], - [dnl Found it in some library. Verify that it works. - gl_getline_needs_run_time_check=yes], - [am_cv_func_working_getline=no]) - if test $gl_getline_needs_run_time_check = yes; then + gl_CHECK_FUNCS_ANDROID([getline], [[#include ]]) + if test $ac_cv_func_getline = yes; then + dnl Found it in some library. Verify that it works. AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data @@ -79,12 +77,17 @@ AC_DEFUN([gl_FUNC_GETLINE], ], [am_cv_func_working_getline="guessing yes"], [case "$host_os" in - *-musl*) am_cv_func_working_getline="guessing yes" ;; - *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; + *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;; + *) am_cv_func_working_getline="$gl_cross_guess_normal" ;; esac ]) ]) ]) + else + am_cv_func_working_getline=no + case "$gl_cv_onwards_func_getline" in + future*) REPLACE_GETLINE=1 ;; + esac fi if test $ac_cv_have_decl_getline = no; then -- cgit v1.2.3-74-g34f1