mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-04 18:28:30 +00:00
Fix more things
- Update a couple unicode data files - Disable strace during logger calls - SQLite now uses pread() / pwrite() - pread() past EOF on NT now returns 0 - Make the NT mmap() and fork() code elegant - Give NT a big performance boost with memory - Add many more mmap() tests to prove it works
This commit is contained in:
parent
b90fa996b4
commit
98909b1391
36 changed files with 1034 additions and 318 deletions
|
@ -35,7 +35,11 @@ static textwindows ssize_t sys_read_nt_impl(struct Fd *fd, void *data,
|
|||
if (ReadFile(fd->handle, data, clampio(size), &got,
|
||||
offset2overlap(offset, &overlap))) {
|
||||
return got;
|
||||
} else if (GetLastError() == kNtErrorBrokenPipe) {
|
||||
} else if (
|
||||
// make sure read() returns 0 on broken pipe
|
||||
GetLastError() == kNtErrorBrokenPipe ||
|
||||
// make sure pread() returns 0 if we start reading after EOF
|
||||
GetLastError() == kNtErrorHandleEof) {
|
||||
return 0;
|
||||
} else {
|
||||
return __winerr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue