]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 8.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 00:19:44 +0000 (01:19 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:55:53 +0000 (15:55 +0100)
* m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Conditionally set
REPLACE_TTYNAME_R.
* lib/unistd.in.h (ttyname_r): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/unistd.in.h
m4/ttyname_r.m4

index 83b5e5dd586e5780790ca2957a7d0422a5959df5..a491d5ab6f191a3e59900b01a6baa893870bd914 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-01-22  Bruno Haible  <bruno@clisp.org>
+
+       Resolve conflicts for functions introduced in Android API level 8.
+       * m4/ttyname_r.m4 (gl_FUNC_TTYNAME_R): Conditionally set
+       REPLACE_TTYNAME_R.
+       * lib/unistd.in.h (ttyname_r): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
 2023-01-22  Bruno Haible  <bruno@clisp.org>
 
        Prepare for resolving conflicts regarding future Android API levels.
index 4812fdb11202d6a8593d121a0fc7a326c82f5143..f6d7c8d0a99c772fb68e2a401a69137f220b5308 100644 (file)
@@ -2173,7 +2173,9 @@ _GL_FUNCDECL_SYS (ttyname_r, int,
 _GL_CXXALIAS_SYS (ttyname_r, int,
                   (int fd, char *buf, size_t buflen));
 # endif
+# if __GLIBC__ >= 2
 _GL_CXXALIASWARN (ttyname_r);
+# endif
 #elif defined GNULIB_POSIXCHECK
 # undef ttyname_r
 # if HAVE_RAW_DECL_TTYNAME_R
index 4a7615546901997843a3ae29942c6ad42bea7532..60aa357c25e42d979a4ba5d0d4465673a7ad2ca7 100644 (file)
@@ -1,4 +1,4 @@
-# ttyname_r.m4 serial 12
+# ttyname_r.m4 serial 13
 dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -20,6 +20,9 @@ AC_DEFUN([gl_FUNC_TTYNAME_R],
   gl_CHECK_FUNCS_ANDROID([ttyname_r], [[#include <unistd.h>]])
   if test $ac_cv_func_ttyname_r = no; then
     HAVE_TTYNAME_R=0
+    case "$gl_cv_onwards_func_ttyname_r" in
+      future*) REPLACE_TTYNAME_R=1 ;;
+    esac
   else
     HAVE_TTYNAME_R=1
     dnl On Mac OS X 10.4 (and Solaris 10 without gl_USE_SYSTEM_EXTENSIONS)