diff options
author | Bruno Haible <bruno@clisp.org> | 2023-01-22 12:34:17 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-01-22 15:56:44 +0100 |
commit | 959415ca4a76b25f254082716a8222f6be140955 (patch) | |
tree | f9bdc11dec15315fb7ae1bfcc901907bcdf57c19 /m4 | |
parent | 09730bf22348989d457861b85ffab15eb0f294cb (diff) | |
download | gnulib-959415ca4a76b25f254082716a8222f6be140955.tar.gz |
Resolve conflicts for functions introduced in Android API level 21.
* m4/execvpe.m4 (gl_FUNC_EXECVPE): Conditionally set REPLACE_EXECVPE.
* m4/linkat.m4 (gl_FUNC_LINKAT): Conditionally set REPLACE_LINKAT.
* m4/readlinkat.m4 (gl_FUNC_READLINKAT): Conditionally set
REPLACE_READLINKAT.
* m4/symlinkat.m4 (gl_FUNC_SYMLINKAT): Conditionally set
REPLACE_SYMLINKAT.
* m4/truncate.m4 (gl_FUNC_TRUNCATE): Conditionally set REPLACE_TRUNCATE.
* lib/unistd.in.h (execvpe, linkat, readlinkat, symlinkat, truncate):
Disable _GL_CXXALIASWARN invocation on non-glibc systems.
Diffstat (limited to 'm4')
-rw-r--r-- | m4/execvpe.m4 | 5 | ||||
-rw-r--r-- | m4/linkat.m4 | 5 | ||||
-rw-r--r-- | m4/readlinkat.m4 | 5 | ||||
-rw-r--r-- | m4/symlinkat.m4 | 5 | ||||
-rw-r--r-- | m4/truncate.m4 | 8 |
5 files changed, 20 insertions, 8 deletions
diff --git a/m4/execvpe.m4 b/m4/execvpe.m4 index 6c0a0e9b7d..3f211049b8 100644 --- a/m4/execvpe.m4 +++ b/m4/execvpe.m4 @@ -1,4 +1,4 @@ -# execvpe.m4 serial 2 +# execvpe.m4 serial 3 dnl Copyright (C) 2020-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, @@ -18,6 +18,9 @@ AC_DEFUN([gl_FUNC_EXECVPE], gl_CHECK_FUNCS_ANDROID([execvpe], [[#include <unistd.h>]]) if test $ac_cv_func_execvpe != yes; then HAVE_EXECVPE=0 + case "$gl_cv_onwards_func_execvpe" in + future*) REPLACE_EXECVPE=1 ;; + esac fi ;; esac diff --git a/m4/linkat.m4 b/m4/linkat.m4 index 9b35fc14e3..032e89bb54 100644 --- a/m4/linkat.m4 +++ b/m4/linkat.m4 @@ -1,4 +1,4 @@ -# serial 15 +# serial 16 # See if we need to provide linkat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -19,6 +19,9 @@ AC_DEFUN([gl_FUNC_LINKAT], gl_CHECK_FUNCS_ANDROID([linkat], [[#include <unistd.h>]]) if test $ac_cv_func_linkat = no; then HAVE_LINKAT=0 + case "$gl_cv_onwards_func_linkat" in + future*) REPLACE_LINKAT=1 ;; + esac else dnl OS X Yosemite has linkat() but it's not sufficient dnl to our needs since it doesn't support creating diff --git a/m4/readlinkat.m4 b/m4/readlinkat.m4 index 416f9c0d64..5c51356291 100644 --- a/m4/readlinkat.m4 +++ b/m4/readlinkat.m4 @@ -1,4 +1,4 @@ -# serial 7 +# serial 8 # See if we need to provide readlinkat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -16,6 +16,9 @@ AC_DEFUN([gl_FUNC_READLINKAT], AC_REQUIRE([gl_FUNC_READLINK]) if test $ac_cv_func_readlinkat = no; then HAVE_READLINKAT=0 + case "$gl_cv_onwards_func_readlinkat" in + future*) REPLACE_READLINKAT=1 ;; + esac else AC_CACHE_CHECK([whether readlinkat signature is correct], [gl_cv_decl_readlinkat_works], diff --git a/m4/symlinkat.m4 b/m4/symlinkat.m4 index d12f91997c..dc3dd323aa 100644 --- a/m4/symlinkat.m4 +++ b/m4/symlinkat.m4 @@ -1,4 +1,4 @@ -# serial 11 +# serial 12 # See if we need to provide symlinkat replacement. dnl Copyright (C) 2009-2023 Free Software Foundation, Inc. @@ -17,6 +17,9 @@ AC_DEFUN([gl_FUNC_SYMLINKAT], gl_CHECK_FUNCS_ANDROID([symlinkat], [[#include <unistd.h>]]) if test $ac_cv_func_symlinkat = no; then HAVE_SYMLINKAT=0 + case "$gl_cv_onwards_func_symlinkat" in + future*) REPLACE_SYMLINKAT=1 ;; + esac else AC_CACHE_CHECK([whether symlinkat handles trailing slash correctly], [gl_cv_func_symlinkat_works], diff --git a/m4/truncate.m4 b/m4/truncate.m4 index b047af34c9..fe9fdbf408 100644 --- a/m4/truncate.m4 +++ b/m4/truncate.m4 @@ -1,4 +1,4 @@ -# truncate.m4 serial 4 -*- Autoconf -*- +# truncate.m4 serial 5 -*- Autoconf -*- dnl Copyright (C) 2017-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, @@ -71,10 +71,10 @@ AC_DEFUN([gl_FUNC_TRUNCATE], fi else HAVE_DECL_TRUNCATE=0 - if test $ac_cv_func_truncate = yes; then + case "$gl_cv_onwards_func_truncate" in dnl Avoid a conflict with the 'truncate' in libc. - REPLACE_TRUNCATE=1 - fi + yes | future*) REPLACE_TRUNCATE=1 ;; + esac fi ]) |