mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-03 09:48:29 +00:00
Remove zlib namespacing (#1142)
We have an optimized version of zlib from the Chromium project. We need it for a lot of our libc services. It would be nice to export this to user applications if we can, since projects like llamafile are already depending on it under the private namespace, to avoid needing to link zlib twice.
This commit is contained in:
parent
deff138e7e
commit
5488f0b2ca
5 changed files with 16 additions and 12 deletions
10
third_party/zip/zipfile.c
vendored
10
third_party/zip/zipfile.c
vendored
|
@ -72,7 +72,7 @@
|
|||
#include "libc/nt/winsock.h"
|
||||
#endif
|
||||
|
||||
unsigned _Cz_crc32(unsigned crc, const unsigned char *buf, unsigned len);
|
||||
unsigned crc32(unsigned crc, const unsigned char *buf, unsigned len);
|
||||
|
||||
/*
|
||||
* XXX start of zipfile.h
|
||||
|
@ -867,7 +867,7 @@ local void read_Unicode_Path_entry(pZipListEntry)
|
|||
}
|
||||
strcpy(iname, pZipListEntry->iname);
|
||||
|
||||
chksum = _Cz_crc32(chksum, (uch *)(iname), strlen(iname));
|
||||
chksum = crc32(chksum, (uch *)(iname), strlen(iname));
|
||||
|
||||
free(iname);
|
||||
|
||||
|
@ -972,7 +972,7 @@ local void read_Unicode_Path_local_entry(pZipListEntry)
|
|||
}
|
||||
strcpy(iname, pZipListEntry->iname);
|
||||
|
||||
chksum = _Cz_crc32(chksum, (uch *)(iname), strlen(iname));
|
||||
chksum = crc32(chksum, (uch *)(iname), strlen(iname));
|
||||
|
||||
free(iname);
|
||||
|
||||
|
@ -1558,7 +1558,7 @@ local int add_Unicode_Path_local_extra_field(pZEntry)
|
|||
# define inameLocal (pZEntry->iname)
|
||||
#endif
|
||||
|
||||
chksum = _Cz_crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
||||
chksum = crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
||||
|
||||
#ifdef WIN32_OEM
|
||||
free(inameLocal);
|
||||
|
@ -1685,7 +1685,7 @@ local int add_Unicode_Path_cen_extra_field(pZEntry)
|
|||
# define inameLocal (pZEntry->iname)
|
||||
#endif
|
||||
|
||||
chksum = _Cz_crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
||||
chksum = crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
||||
|
||||
#ifdef WIN32_OEM
|
||||
free(inameLocal);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue