mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Rewrite special file handling on Windows
This change gets GNU grep working. What caused it to not work, is it wouldn't write to an output file descriptor when its dev/ino equaled /dev/null's. So now we invent special dev/ino values for these files
This commit is contained in:
parent
aca2261cda
commit
2db2f40a98
53 changed files with 485 additions and 299 deletions
7
third_party/nsync/futex.c
vendored
7
third_party/nsync/futex.c
vendored
|
@ -169,10 +169,11 @@ static int nsync_futex_wait_win32_ (atomic_int *w, int expect, char pshare,
|
|||
return 0;
|
||||
}
|
||||
if (pt) atomic_store_explicit (&pt->pt_blocker, w, memory_order_release);
|
||||
if (_check_cancel() == -1) return -1;
|
||||
if (_check_signal(false) == -1) return -1;
|
||||
if (_check_cancel () == -1) return -1;
|
||||
if (_check_signal (false) == -1) return -1;
|
||||
ok = WaitOnAddress (w, &expect, sizeof(int), timespec_tomillis (wait));
|
||||
if (_check_cancel() == -1) return -1;
|
||||
if (_check_signal (false) == -1) { _check_cancel (); return -1; }
|
||||
if (_check_cancel () == -1) return -1;
|
||||
if (ok) {
|
||||
return 0;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue