Improve cosmocc toolchain

- Decouple zlib from libc
- Add some underscores to mostly internal names
This commit is contained in:
Justine Tunney 2023-03-05 23:52:17 -08:00
parent 713d4424c6
commit ba180e754d
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
25 changed files with 128 additions and 42 deletions

View file

@ -238,8 +238,8 @@ static textwindows dontinline noasan void *MapMemories(char *addr, size_t size,
return addr;
}
noasan inline void *Mmap(void *addr, size_t size, int prot, int flags, int fd,
int64_t off) {
noasan inline void *_Mmap(void *addr, size_t size, int prot, int flags, int fd,
int64_t off) {
char *p = addr;
struct DirectMap dm;
int a, b, i, f, m, n, x;
@ -494,7 +494,7 @@ void *mmap(void *addr, size_t size, int prot, int flags, int fd, int64_t off) {
#endif
__mmi_lock();
if (!__isfdkind(fd, kFdZip)) {
res = Mmap(addr, size, prot, flags, fd, off);
res = _Mmap(addr, size, prot, flags, fd, off);
} else {
res = _weaken(__zipos_Mmap)(
addr, size, prot, flags,