mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 11:18:30 +00:00
Improve cosmocc toolchain
- Decouple zlib from libc - Add some underscores to mostly internal names
This commit is contained in:
parent
713d4424c6
commit
ba180e754d
25 changed files with 128 additions and 42 deletions
|
@ -64,7 +64,7 @@ noasan void *__zipos_Mmap(void *addr, size_t size, int prot, int flags,
|
|||
|
||||
const int tempProt = !IsXnu() ? prot | PROT_WRITE : PROT_WRITE;
|
||||
void *outAddr =
|
||||
Mmap(addr, size, tempProt, (flags & (~MAP_FILE)) | MAP_ANONYMOUS, -1, 0);
|
||||
_Mmap(addr, size, tempProt, (flags & (~MAP_FILE)) | MAP_ANONYMOUS, -1, 0);
|
||||
if (outAddr == MAP_FAILED) {
|
||||
return MAP_FAILED;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ noasan void *__zipos_Mmap(void *addr, size_t size, int prot, int flags,
|
|||
return outAddr;
|
||||
} while (0);
|
||||
const int e = errno;
|
||||
Munmap(outAddr, size);
|
||||
_Munmap(outAddr, size);
|
||||
errno = e;
|
||||
strace_enabled(+1);
|
||||
return MAP_FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue