>From dd38adc80bd083fcfc2f99df6ffc1b341139442f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 01:38:16 +0100 Subject: [PATCH 06/47] Resolve conflicts for functions introduced in Android API level 12. * m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE. * lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 4 ++++ lib/unistd.in.h | 2 ++ m4/pwrite.m4 | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0ff8954a34..a9a774a37d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Resolve conflicts for functions introduced in Android API level 12. + * m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE. + * lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD. * lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on non-glibc systems. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index d625b81cad..bc69194fac 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1840,7 +1840,9 @@ _GL_FUNCDECL_SYS (pwrite, ssize_t, _GL_CXXALIAS_SYS (pwrite, ssize_t, (int fd, const void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pwrite); +# endif #elif defined GNULIB_POSIXCHECK # undef pwrite # if HAVE_RAW_DECL_PWRITE diff --git a/m4/pwrite.m4 b/m4/pwrite.m4 index 48c5255f30..51051c1bc4 100644 --- a/m4/pwrite.m4 +++ b/m4/pwrite.m4 @@ -1,4 +1,4 @@ -# pwrite.m4 serial 7 +# pwrite.m4 serial 8 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, @@ -95,5 +95,8 @@ changequote([,])dnl esac else HAVE_PWRITE=0 + case "$gl_cv_onwards_func_pwrite" in + future*) REPLACE_PWRITE=1 ;; + esac fi ]) -- 2.34.1