From 33c8286ea93bec94c46d777a77d471babd3698e0 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Thu, 23 Aug 2007 02:00:18 +0000 Subject: Getline touchups. * lib/getdelim.c (getdelim): Revert regression that required *n to be 0 when *lineptr is NULL. Preserve errno across funlockfile. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check for declaration of getdelim, rather than whether implementation is missing. * m4/getline.m4 (gl_FUNC_GETLINE): Likewise for getline. * lib/stdio_.h (getline): Also declare if replacement is required. * doc/functions/getdelim.texi: New file. * doc/functions/getline.texi: Likewise. * doc/gnulib.texi (Function Substitutes): Add new files. Reported by Bruno Haible. --- m4/getdelim.m4 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'm4/getdelim.m4') diff --git a/m4/getdelim.m4 b/m4/getdelim.m4 index 21be20c3a1..7f6e3b41f7 100644 --- a/m4/getdelim.m4 +++ b/m4/getdelim.m4 @@ -6,7 +6,7 @@ dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -AC_PREREQ(2.52) +AC_PREREQ([2.60]) AC_DEFUN([gl_FUNC_GETDELIM], [ @@ -15,11 +15,14 @@ AC_DEFUN([gl_FUNC_GETDELIM], dnl Persuade glibc to declare getdelim(). AC_REQUIRE([AC_GNU_SOURCE]) - AC_REPLACE_FUNCS(getdelim) - AC_CHECK_DECLS_ONCE(getdelim) + AC_REPLACE_FUNCS([getdelim]) + AC_CHECK_DECLS_ONCE([getdelim]) if test $ac_cv_func_getdelim = no; then gl_PREREQ_GETDELIM + fi + + if test $ac_cv_have_decl_getdelim = no; then HAVE_DECL_GETDELIM=0 fi ]) -- cgit v1.2.1