]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 18.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 01:22:22 +0000 (02:22 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:15 +0000 (15:56 +0100)
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
* m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
* lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
invocation on non-glibc systems.

ChangeLog
lib/stdio.in.h
m4/getdelim.m4
m4/getline.m4

index b60113ead2c92d5d92f15ab2f1f9143a737e0af3..39c23bce8013fe6ae3d22cad8b5804fd487b308e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-01-22  Bruno Haible  <bruno@clisp.org>
+
+       Resolve conflicts for functions introduced in Android API level 18.
+
+       * m4/getdelim.m4 (gl_FUNC_GETDELIM): Conditionally set REPLACE_GETDELIM.
+       * m4/getline.m4 (gl_FUNC_GETLINE): Conditionally set REPLACE_GETLINE.
+       * lib/stdio.in.h (getdelim, getline): Disable _GL_CXXALIASWARN
+       invocation on non-glibc systems.
+
 2023-01-22  Bruno Haible  <bruno@clisp.org>
 
        Resolve conflicts for functions introduced in Android API level 16-17.
index 8b5ef4bd2dd5c58222cb5ee5237a2c06b6bcd3b2..e3bd60dae13b0100e3ed266bd7307b2a8efcde17 100644 (file)
@@ -882,7 +882,9 @@ _GL_CXXALIAS_SYS (getdelim, ssize_t,
                    int delimiter,
                    FILE *restrict stream));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (getdelim);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef getdelim
 # if HAVE_RAW_DECL_GETDELIM
@@ -921,7 +923,7 @@ _GL_CXXALIAS_SYS (getline, ssize_t,
                   (char **restrict lineptr, size_t *restrict linesize,
                    FILE *restrict stream));
 # endif
-# if @HAVE_DECL_GETLINE@
+# if __GLIBC__ >= 2 && @HAVE_DECL_GETLINE@
 _GL_CXXALIASWARN (getline);
 # endif
 #elif defined GNULIB_POSIXCHECK
index bbd7c03bcba72db8b54cd49584ded800c15a7ba3..d89aae5dffc364cd6661e739a6bb36e22e6192dc 100644 (file)
@@ -1,4 +1,4 @@
-# getdelim.m4 serial 17
+# getdelim.m4 serial 18
 
 dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
 dnl
@@ -96,6 +96,9 @@ AC_DEFUN([gl_FUNC_GETDELIM],
     esac
   else
     HAVE_GETDELIM=0
+    case "$gl_cv_onwards_func_getdelim" in
+      future*) REPLACE_GETDELIM=1 ;;
+    esac
   fi
 
   if test $ac_cv_have_decl_getdelim = no; then
index f68fa3a1acf8723438ee2f41453bc672752de886..1f2825c3361f53866245e04764d90aa78556b66b 100644 (file)
@@ -1,4 +1,4 @@
-# getline.m4 serial 31
+# getline.m4 serial 32
 
 dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation,
 dnl Inc.
@@ -84,6 +84,9 @@ AC_DEFUN([gl_FUNC_GETLINE],
       ])
   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