>From 3d30085be2768a3de78c5f90fe5160b0d623a771 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 01:34:16 +0100 Subject: [PATCH 04/47] Resolve conflicts for functions introduced in Android API level 12. * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set REPLACE_FTRUNCATE. * lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 9 +++++++++ lib/unistd.in.h | 2 ++ m4/ftruncate.m4 | 5 ++++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0859e1fd87..badff3bc76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2023-01-22 Bruno Haible + + Resolve conflicts for functions introduced in Android API level 12. + + * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set + REPLACE_FTRUNCATE. + * lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + 2023-01-22 Bruno Haible Resolve conflicts for functions introduced in Android API level 9. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 9b330286e0..349a0c3f80 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1064,7 +1064,9 @@ _GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); # endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (ftruncate); +# endif #elif defined GNULIB_POSIXCHECK # undef ftruncate # if HAVE_RAW_DECL_FTRUNCATE diff --git a/m4/ftruncate.m4 b/m4/ftruncate.m4 index f48126e856..cbb5f423de 100644 --- a/m4/ftruncate.m4 +++ b/m4/ftruncate.m4 @@ -1,4 +1,4 @@ -# serial 22 +# serial 23 # See if we need to emulate a missing ftruncate function using _chsize. @@ -30,6 +30,9 @@ AC_DEFUN([gl_FUNC_FTRUNCATE], ]) else HAVE_FTRUNCATE=0 + case "$gl_cv_onwards_func_ftruncate" in + future*) REPLACE_FTRUNCATE=1 ;; + esac fi ]) -- 2.34.1