]> Savannah Git Hosting - gnulib.git/commitdiff
Resolve conflicts for functions introduced in Android API level 12.
authorBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 00:41:06 +0000 (01:41 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:04 +0000 (15:56 +0100)
* m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM.
* lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/time.in.h
m4/timegm.m4

index a9a774a37d7cefec2a28b8fbaeed45a8e835b2d9..069ce89b10113f4e59edaae30cd25ba6c83ec5ed 100644 (file)
--- 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.
index 50c9b30b6b35c78c54b6ad17fcb5aae199140a6a..fa0c6351b2c4c4b80e828beb5a5b15b34f2efbb0 100644 (file)
@@ -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
index fa84e98db3e7a05d9f44118c92447de29db98b3f..8ab265e65fec74688b10249d5f37cfa4483cec89 100644 (file)
@@ -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
 ])