dnl SCO has strftime() in libintl
AC_CHECK_FUNCS(strftime, , [AC_CHECK_LIB(intl, strftime)])
+dnl Set the atime of files
+AC_CHECK_FUNCS(futimens)
+
dnl AIX may not have fchdir()
AC_CHECK_FUNCS(fchdir, , [mutt_cv_fchdir=no])
#else
"-HAVE_RESIZETERM "
#endif
+
+#ifdef HAVE_FUTIMENS
+ "+HAVE_FUTIMENS "
+#else
+ "-HAVE_FUTIMENS "
+#endif
);
puts (
rc = mmdf_parse_mailbox (ctx);
else
rc = -1;
+ mutt_touch_atime (fileno (ctx->fp));
mbox_unlock_mailbox (ctx);
mutt_unblock_signals ();
return (-1);
}
+ mutt_touch_atime (fileno (ctx->fp));
+
/* now try to recover the old flags */
index_hint_set = (index_hint == NULL);
}
}
+/* set atime to current time, just as read() would do on !noatime.
+ * Silently ignored if unsupported. */
+void mutt_touch_atime (int f)
+{
+#ifdef HAVE_FUTIMENS
+ struct timespec times[2]={{0,UTIME_NOW},{0,UTIME_OMIT}};
+ futimens(f, times);
+#endif
+}
+
const char *mutt_make_version (void)
{
static char vstring[STRING];
time_t mutt_mktime (struct tm *, int);
time_t mutt_parse_date (const char *, HEADER *);
int is_from (const char *, char *, size_t, time_t *);
+void mutt_touch_atime (int);
const char *mutt_attach_fmt (
char *dest,