Hash :
e074cd27
Author :
Date :
2023-01-22T01:23:47
Resolve conflicts for functions introduced in Android API level 9. * lib/unistd.in.h (fdatasync): Consider REPLACE_FDATASYNC. Disable _GL_CXXALIASWARN invocation on non-glibc systems. (pipe2): Consider REPLACE_PIPE2. Disable _GL_CXXALIASWARN invocation on non-glibc systems. * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Initialize REPLACE_FDATASYNC, REPLACE_PIPE2. * modules/unistd (Makefile.am): Substitute REPLACE_FDATASYNC, REPLACE_PIPE2. * m4/fdatasync.m4 (gl_FUNC_FDATASYNC): Test for fdatasync using gl_CHECK_FUNCS_ANDROID instead of AC_CHECK_FUNCS. Conditionally set REPLACE_FDATASYNC. * modules/fdatasync (Depends-on, configure.ac): Consider REPLACE_FDATASYNC. * m4/pipe2.m4 (gl_FUNC_PIPE2): Conditionally set REPLACE_PIPE2.
# pipe2.m4 serial 4
dnl Copyright (C) 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,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_PIPE2],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
dnl Persuade glibc <unistd.h> to declare pipe2().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
gl_CHECK_FUNCS_ANDROID([pipe2], [[#include <unistd.h>]])
if test $ac_cv_func_pipe2 != yes; then
HAVE_PIPE2=0
case "$gl_cv_onwards_func_pipe2" in
future*) REPLACE_PIPE2=1 ;;
esac
else
REPLACE_PIPE2=1
fi
])