From 73fc9518b91b0631591229484fdf65285e412ae0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 01:36:31 +0100 Subject: [PATCH 05/47] Resolve conflicts for functions introduced in Android API level 12. * m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD. * lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 4 ++++ lib/unistd.in.h | 2 ++ m4/pread.m4 | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index badff3bc76..0ff8954a34 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Resolve conflicts for functions introduced in Android API level 12. + * m4/pread.m4 (gl_FUNC_PREAD): Conditionally set REPLACE_PREAD. + * lib/unistd.in.h (pread): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set REPLACE_FTRUNCATE. * lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 349a0c3f80..d625b81cad 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1803,7 +1803,9 @@ _GL_FUNCDECL_SYS (pread, ssize_t, _GL_CXXALIAS_SYS (pread, ssize_t, (int fd, void *buf, size_t bufsize, off_t offset)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (pread); +# endif #elif defined GNULIB_POSIXCHECK # undef pread # if HAVE_RAW_DECL_PREAD diff --git a/m4/pread.m4 b/m4/pread.m4 index 8031f910d4..2c60e7c70f 100644 --- a/m4/pread.m4 +++ b/m4/pread.m4 @@ -1,4 +1,4 @@ -# pread.m4 serial 7 +# pread.m4 serial 8 dnl Copyright (C) 2009-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, @@ -81,5 +81,8 @@ changequote([,])dnl esac else HAVE_PREAD=0 + case "$gl_cv_onwards_func_pread" in + future*) REPLACE_PREAD=1 ;; + esac fi ]) -- 2.34.1