>From ca227be2d8649a2a55a4953a97db4f992895440b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Jan 2023 01:41:06 +0100 Subject: [PATCH 07/47] Resolve conflicts for functions introduced in Android API level 12. * m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM. * lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on non-glibc systems. --- ChangeLog | 4 ++++ lib/time.in.h | 2 ++ m4/timegm.m4 | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a9a774a37d..069ce89b10 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,10 @@ Resolve conflicts for functions introduced in Android API level 12. + * m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM. + * lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on + non-glibc systems. + * m4/pwrite.m4 (gl_FUNC_PWRITE): Conditionally set REPLACE_PWRITE. * lib/unistd.in.h (pwrite): Disable _GL_CXXALIASWARN invocation on non-glibc systems. diff --git a/lib/time.in.h b/lib/time.in.h index 50c9b30b6b..fa0c6351b2 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -423,7 +423,9 @@ _GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); # endif _GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); # endif +# if __GLIBC__ >= 2 _GL_CXXALIASWARN (timegm); +# endif # endif /* Encourage applications to avoid unsafe functions that can overrun diff --git a/m4/timegm.m4 b/m4/timegm.m4 index fa84e98db3..8ab265e65f 100644 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,4 +1,4 @@ -# timegm.m4 serial 14 +# timegm.m4 serial 15 dnl Copyright (C) 2003, 2007, 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, @@ -17,6 +17,9 @@ AC_DEFUN([gl_FUNC_TIMEGM], fi else HAVE_TIMEGM=0 + case "$gl_cv_onwards_func_timegm" in + future*) REPLACE_TIMEGM=1 ;; + esac fi ]) -- 2.34.1