test-stat-time: port to mingw
authorEric Blake <ebb9@byu.net>
Tue, 13 Oct 2009 15:16:16 +0000 (09:16 -0600)
committerEric Blake <ebb9@byu.net>
Wed, 14 Oct 2009 12:25:27 +0000 (06:25 -0600)
commit20bdd2f41cb9d43df6dd0cfe361ac73a0e8148f9
treece89fe652a117b3fb7eb17484982deba34831862
parent0f24cad045453ba041791cadec388080a798a285
test-stat-time: port to mingw

Newer mingw has usleep, but it rejects arguments over 1000000
without sleeping.  And since stat has no visibility into
sub-second resolutions, it meant all the timestamps ended up
identical.  Fixed by restoring the 8 seconds of sleep, as
well as working around the documented unlink issue.

* tests/test-stat-time.c (force_unlink): Return a value.
(test_ctime) [W32]: Fix compilation error.
(nap): Don't call usleep with too large an argument.  Use
force_unlink.
* doc/pastposix-functions/usleep.texi (usleep): Document the
portability issue.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/pastposix-functions/usleep.texi
tests/test-stat-time.c