* 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.
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.
+
* m4/mkfifoat.m4 (gl_FUNC_MKFIFOAT): Conditionally set REPLACE_MKNODAT.
* lib/sys_stat.in.h (mknodat): Disable _GL_CXXALIASWARN invocation on
non-glibc systems.
_GL_CXXALIAS_SYS (execvpe, int,
(const char *program, char * const *argv, char * const *env));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (execvpe);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef execvpe
# if HAVE_RAW_DECL_EXECVPE
(int fd1, const char *path1, int fd2, const char *path2,
int flag));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (linkat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef linkat
# if HAVE_RAW_DECL_LINKAT
(int fd, char const *restrict file,
char *restrict buf, size_t len));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (readlinkat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef readlinkat
# if HAVE_RAW_DECL_READLINKAT
_GL_CXXALIAS_SYS (symlinkat, int,
(char const *contents, int fd, char const *file));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (symlinkat);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef symlinkat
# if HAVE_RAW_DECL_SYMLINKAT
# endif
_GL_CXXALIAS_SYS (truncate, int, (const char *filename, off_t length));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (truncate);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef truncate
# if HAVE_RAW_DECL_TRUNCATE
-# 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,
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
-# serial 15
+# serial 16
# See if we need to provide linkat replacement.
dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
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
-# serial 7
+# serial 8
# See if we need to provide readlinkat replacement.
dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
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],
-# serial 11
+# serial 12
# See if we need to provide symlinkat replacement.
dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
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],
-# 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,
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
])