* modules/stat-time-tests (configure.ac): Use AC_CHECK_FUNCS_ONCE.
* tests/test-stat-time.c (nap): Separate assignment from call.
Suggested by Paolo Bonzini and Bruno Haible.
Signed-off-by: Eric Blake <ebb9@byu.net>
2009-10-12 Eric Blake <ebb9@byu.net>
+ stat-time-tests: minor cleanups
+ * modules/stat-time-tests (configure.ac): Use AC_CHECK_FUNCS_ONCE.
+ * tests/test-stat-time.c (nap): Separate assignment from call.
+ Suggested by Paolo Bonzini and Bruno Haible.
+
sys_stat: guarantee struct timespec
* lib/sys_stat.in.h (includes): Always include <time.h>
* modules/sys_stat (Depends-on): Add time.
sleep
configure.ac:
-AC_CHECK_FUNCS([usleep])
+AC_CHECK_FUNCS_ONCE([usleep])
Makefile.am:
TESTS += test-stat-time
struct stat st2;
ASSERT (stat ("t-stt-stamp1", &st1) == 0);
ASSERT (unlink ("t-stt-stamp1") == 0);
- usleep (delay = 15000);
+ delay = 15000;
+ usleep (delay);
create_file ("t-stt-stamp1");
ASSERT (stat ("t-stt-stamp1", &st2) == 0);
if (st1.st_mtime != st2.st_mtime)