Mercurial > hg > octave-shane > gnulib-hg
annotate modules/fnmatch-posix @ 17388:3c592b4deb04
utimensat-tests, etc.: try to fix some races
Problem reported by Bernhard Voelker in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-04/msg00071.html>.
I don't know whether this patch fixes that race condition, but it
fixes *some* race conditions, so it should be a win.
* modules/chown-tests (Depends-on):
* modules/fchownat-tests (Depends-on):
* modules/fdutimensat-tests (Depends-on):
* modules/futimens-tests (Depends-on):
* modules/lchown-tests (Depends-on):
* modules/stat-time-tests (Depends-on):
* modules/utimens-tests (Depends-on):
* modules/utimensat-tests (Depends-on):
Depend on nanosleep, not usleep.
* modules/chown-tests (test_chown_LDADD):
* modules/lchown-tests (test_lchown_LDADD):
* modules/stat-time-tests (test_stat_time_LDADD):
New macro.
* modules/fchownat-tests (test_fchownat_LDADD):
* modules/fdutimensat-tests (test_fdutimensat_LDADD):
* modules/futimens-tests (test_futimens_LDADD):
* modules/utimens-tests (test_utimens_LDADD):
* modules/utimensat-tests (test_utimensat_LDADD):
Add $(LIB_NANOSLEEP).
* modules/stat-time-tests (Files): Add tests/nap.h.
* tests/nap.h: Include <limits.h>, for INT_MAX.
(lt_mtime): Remove.
(diff_timespec): New function.
(get_stat): Rename from get_mtime. All callers changed.
(nap_works): Determine the needed delay by inspecting the
file system's timestamp jumps; this should be more reliable.
Look at both mtime and ctime, and take the maximum of the two jumps.
(nap_works, guess_delay):
Return a nanosecond cound, not a microsecond count.
All callers changed.
(nap_works, nap): Use nanosleep, not usleep. Check for nanosleep
failure.
(nap): Multiply the guess by 1.125, to accommodate the case where
the file system's clock is a bit slower than nanosleep's clock.
* tests/test-stat-time.c (BASE): New macro.
Include nap.h.
(nap): Remove; nap.h now defines this. This removes a duplicate
implementation of 'nap'.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 30 Apr 2013 23:14:19 -0700 |
parents | 440d21ed4f64 |
children |
rev | line source |
---|---|
4110 | 1 Description: |
4172 | 2 fnmatch() function: wildcard matching. |
4110 | 3 |
11541
052491fe562d
Move the fnmatch-posix module into the fnmatch module.
Bruno Haible <bruno@clisp.org>
parents:
10415
diff
changeset
|
4 Status: |
14744
440d21ed4f64
Fix confusion regarding deprecated modules.
Bruno Haible <bruno@clisp.org>
parents:
11541
diff
changeset
|
5 deprecated |
11541
052491fe562d
Move the fnmatch-posix module into the fnmatch module.
Bruno Haible <bruno@clisp.org>
parents:
10415
diff
changeset
|
6 |
052491fe562d
Move the fnmatch-posix module into the fnmatch module.
Bruno Haible <bruno@clisp.org>
parents:
10415
diff
changeset
|
7 Notice: |
14744
440d21ed4f64
Fix confusion regarding deprecated modules.
Bruno Haible <bruno@clisp.org>
parents:
11541
diff
changeset
|
8 This module is deprecated. Use the module 'fnmatch' instead. |
11541
052491fe562d
Move the fnmatch-posix module into the fnmatch module.
Bruno Haible <bruno@clisp.org>
parents:
10415
diff
changeset
|
9 |
4110 | 10 Files: |
11 | |
12 Depends-on: | |
13 fnmatch | |
14 | |
15 configure.ac: | |
16 | |
17 Makefile.am: | |
18 | |
19 Include: | |
20 "fnmatch.h" | |
21 | |
5251
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4197
diff
changeset
|
22 License: |
10415
59a0f4cf8022
Consistent license terms for all the fnmatch modules.
Yoann Vandoorselaere <yoann.v@prelude-ids.com>
parents:
5251
diff
changeset
|
23 LGPLv2+ |
5251
42b53a22aee5
Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents:
4197
diff
changeset
|
24 |
4197 | 25 Maintainer: |
26 all | |
27 |