summaryrefslogtreecommitdiff
path: root/m4/utimens.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/utimens.m4')
-rw-r--r--m4/utimens.m421
1 files changed, 13 insertions, 8 deletions
diff --git a/m4/utimens.m4 b/m4/utimens.m4
index 1de94a5a915..0f5bfd4c843 100644
--- a/m4/utimens.m4
+++ b/m4/utimens.m4
@@ -3,7 +3,7 @@ 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.
-dnl serial 11
+dnl serial 16
AC_DEFUN([gl_UTIMENS],
[
@@ -11,7 +11,11 @@ AC_DEFUN([gl_UTIMENS],
AC_REQUIRE([gl_FUNC_UTIMES])
AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CHECK_FUNCS_ONCE([futimes futimesat futimens utimensat lutimes])
+ gl_CHECK_FUNCS_ANDROID([futimes], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([futimesat], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([lutimes], [[#include <sys/time.h>]])
+ gl_CHECK_FUNCS_ANDROID([futimens], [[#include <sys/stat.h>]])
+ gl_CHECK_FUNCS_ANDROID([utimensat], [[#include <sys/stat.h>]])
if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
dnl FreeBSD 8.0-rc2 mishandles futimesat(fd,NULL,time). It is not
@@ -32,12 +36,13 @@ AC_DEFUN([gl_UTIMENS],
[gl_cv_func_futimesat_works=yes],
[gl_cv_func_futimesat_works=no],
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_futimesat_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems
+ # and on systems that emulate the Linux system calls.
+ linux* | midipix*) gl_cv_func_futimesat_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_futimesat_works="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.file])