Commit Graph

8 Commits

Author SHA1 Message Date
ridiculousfish
45dfa2d864 Attempt to fix the sporadic uvar test failures on Linux
We identify when the universal variable file has changed out from under us by
comparing a bunch of fields from its stat: inode, device, size, high-precision
timestamp, generation. Linux aggressively reuses inodes, and the size may be
the same by coincidence (which is the case in the tests). Also, Linux
officially has nanosecond precision, but in practice it seems to only uses
millisecond precision for storing mtimes. Thus if there are three or more
updates within a millisecond, every field we check may be the same, and we are
vulnerable to the ABA problem. I believe this explains the occasional test
failures.

The solution is to manually set the nanosecond field of the mtime timestamp to
something unlikely to be duplicated, like a random number, or better yet, the
current time (with nanosecond precision). This is more in the spirit of the
timestamp, and it means we're around a million times less likely to collide.
This seems to fix the tests.
2015-11-08 23:48:32 -08:00
ridiculousfish
b9b6b6108e Dead macro cleanup
Enable -Wunused-macros, and remove said unused macros
2015-08-10 22:01:50 -07:00
ridiculousfish
3a3a9f5cc1 Add wreaddir_for_dirs function
Eliminates some stat calls, speeding up wildcard expansion
2015-08-08 14:52:04 -07:00
ridiculousfish
70548f7cc7 Initial implementation of wildcard match refactoring
Not yet turned on.
2015-08-08 13:55:43 -07:00
David Adam
958880d972 src/wutil: drop <features.h> header, _BSD_SOURCE is defined by the compiler 2015-07-26 19:58:02 +08:00
David Adam
3929e9de0e Merge branch 'master' into iwyu 2015-07-26 10:20:13 +08:00
ridiculousfish
ac72db8ef0 Make our wgettext() implementation a little less terrifying
Use wchar_t* directly instead of wcstring.c_str()
2015-07-25 16:01:59 -07:00
ridiculousfish
b4f53143b0 Migrate source files into src/ directory
This change moves source files into a src/ directory,
and puts object files into an obj/ directory. The Makefile
and xcode project are updated accordingly.

Fixes #1866
2015-07-24 00:59:27 -07:00