]> 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:34:16 +0000 (01:34 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 22 Jan 2023 14:55:58 +0000 (15:55 +0100)
* m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Conditionally set
REPLACE_FTRUNCATE.
* lib/unistd.in.h (ftruncate): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.

ChangeLog
lib/unistd.in.h
m4/ftruncate.m4

index 0859e1fd87dcf2203a3558139f2885c8406a36f5..badff3bc76e2608686ca2903413ed0c48db19be0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-01-22  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        Resolve conflicts for functions introduced in Android API level 9.
index 9b330286e040dbae737f02cdf1e9704e8df7550a..349a0c3f80fdffbdd42a67f50ef8713a0c1b5201 100644 (file)
@@ -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
index f48126e8560e2fc880e57e7d0a228fc48bbd4330..cbb5f423de1ee04e64f96c0d4465ce554952ba65 100644 (file)
@@ -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
 ])