>From fbe4d2d5362f8dea731f7162011eafb78ba7c073 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 14:14:42 +0100 Subject: [PATCH 35/47] Resolve conflicts for functions introduced in Android API level 23. * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Conditionally set REPLACE_LOGIN_TTY. * lib/utmp.in.h (login_tty): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 5 +++++ lib/utmp.in.h | 2 ++ m4/login_tty.m4 | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6b292af178..0239e388cd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ Resolve conflicts for functions introduced in Android API level 23. + * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Conditionally set + REPLACE_LOGIN_TTY. + * lib/utmp.in.h (login_tty): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKFIFOAT. * lib/sys_stat.in.h (mkfifoat): Disable _GL_CXXALIASWARN invocation on non-glibc systems. diff --git a/lib/utmp.in.h b/lib/utmp.in.h index 58318e7ffb..c33b3d2469 100644 --- a/lib/utmp.in.h +++ b/lib/utmp.in.h @@ -62,7 +62,9 @@ _GL_FUNCDECL_SYS (login_tty, int, (int fd)); # endif _GL_CXXALIAS_SYS (login_tty, int, (int fd)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (login_tty); +# endif #elif defined GNULIB_POSIXCHECK # undef login_tty # if HAVE_RAW_DECL_LOGIN_TTY diff --git a/m4/login_tty.m4 b/m4/login_tty.m4 index 0d504050f1..ca15e6aabb 100644 --- a/m4/login_tty.m4 +++ b/m4/login_tty.m4 @@ -1,4 +1,4 @@ -# login_tty.m4 serial 1 +# login_tty.m4 serial 2 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, @@ -26,5 +26,8 @@ AC_DEFUN([gl_FUNC_LOGIN_TTY], if test $ac_cv_func_login_tty = no; then HAVE_LOGIN_TTY=0 + case "$gl_cv_onwards_func_login_tty" in + future*) REPLACE_LOGIN_TTY=1 ;; + esac fi ]) -- 2.34.1