]> 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:46:21 +0000 (01:46 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:56:07 +0000 (15:56 +0100)
* m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Conditionally set
REPLACE_UTIMENSAT.
* lib/sys_stat.in.h (utimensat): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/sys_stat.in.h
m4/utimensat.m4

index 069ce89b10113f4e59edaae30cd25ba6c83ec5ed..e711c34b6cf6050f151582dbee6e111cfcef4f7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@
 
        Resolve conflicts for functions introduced in Android API level 12.
 
+       * m4/utimensat.m4 (gl_FUNC_UTIMENSAT): Conditionally set
+       REPLACE_UTIMENSAT.
+       * lib/sys_stat.in.h (utimensat): Disable _GL_CXXALIASWARN invocation on
+       non-glibc systems.
+
        * m4/timegm.m4 (gl_FUNC_TIMEGM): Conditionally set REPLACE_TIMEGM.
        * lib/time.in.h (timegm): Disable _GL_CXXALIASWARN invocation on
        non-glibc systems.
index 096887c016218a6f560babb2427c4d2a09e15530..915cab08fbd108f6b5178f3422e3de41633fbd7e 100644 (file)
@@ -937,7 +937,7 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name,
 _GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name,
                                    struct timespec const times[2], int flag));
 # endif
-# if @HAVE_UTIMENSAT@
+# if __GLIBC__ >= 2 && @HAVE_UTIMENSAT@
 _GL_CXXALIASWARN (utimensat);
 # endif
 #elif defined GNULIB_POSIXCHECK
index 1d3db2efa232b6cf28cbc3733b34b53f187894a5..1a670bb7b786e0a880f98246d03791b1c074265d 100644 (file)
@@ -1,4 +1,4 @@
-# serial 10
+# serial 11
 # See if we need to provide utimensat replacement.
 
 dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
@@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_UTIMENSAT],
   gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]])
   if test $ac_cv_func_utimensat = no; then
     HAVE_UTIMENSAT=0
+    case "$gl_cv_onwards_func_utimensat" in
+      future*) REPLACE_UTIMENSAT=1 ;;
+    esac
   else
     AC_CACHE_CHECK([whether utimensat works],
       [gl_cv_func_utimensat_works],