3 dnl Shamelessly cloned from acspecific.m4's AC_FUNC_UTIME_NULL,
4 dnl then do case-insensitive s/utime/utimes/.
6 AC_DEFUN(jm_FUNC_UTIMES_NULL,
7 [AC_CACHE_CHECK(whether utimes accepts a null argument, ac_cv_func_utimes_null,
8 [rm -f conftestdata; > conftestdata
10 /* In case stat has been defined to rpl_stat, undef it here. */
12 #include <sys/types.h>
16 exit(!(stat ("conftestdata", &s) == 0 && utimes("conftestdata", (long *)0) == 0
17 && stat("conftestdata", &t) == 0 && t.st_mtime >= s.st_mtime
18 && t.st_mtime - s.st_mtime < 120));
20 ac_cv_func_utimes_null=yes,
21 ac_cv_func_utimes_null=no,
22 ac_cv_func_utimes_null=no)
23 rm -f core core.* *.core])
25 if test $ac_cv_func_utimes_null = yes; then
26 AC_DEFINE_UNQUOTED(HAVE_UTIMES_NULL, 1,
27 [Define if utimes accepts a null argument])