mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 15:03:34 +00:00
Revert "Remove zlib namespacing (#1142)"
This reverts commit 5488f0b2ca
which was a
good experiment to try, that didn't work out due to #1176
Fixes #1176
This commit is contained in:
parent
13b9ecd537
commit
2f3c6e7cc3
5 changed files with 12 additions and 16 deletions
|
@ -33,9 +33,9 @@
|
||||||
|
|
||||||
__static_yoink("zipos");
|
__static_yoink("zipos");
|
||||||
__static_yoink("libc/testlib/hyperion.txt");
|
__static_yoink("libc/testlib/hyperion.txt");
|
||||||
__static_yoink("inflate");
|
__static_yoink("_Cz_inflate");
|
||||||
__static_yoink("inflateInit2");
|
__static_yoink("_Cz_inflateInit2");
|
||||||
__static_yoink("inflateEnd");
|
__static_yoink("_Cz_inflateEnd");
|
||||||
|
|
||||||
void *Worker(void *arg) {
|
void *Worker(void *arg) {
|
||||||
int i, fd;
|
int i, fd;
|
||||||
|
|
6
third_party/musl/pwd.c
vendored
6
third_party/musl/pwd.c
vendored
|
@ -45,9 +45,9 @@ __static_yoink("musl_libc_notice");
|
||||||
// something as substantive as this library, then we shall assume the
|
// something as substantive as this library, then we shall assume the
|
||||||
// application is meaty enough to benefit from the performance of the
|
// application is meaty enough to benefit from the performance of the
|
||||||
// chromium zlib library (costs ~40kb binary) versus just having puff
|
// chromium zlib library (costs ~40kb binary) versus just having puff
|
||||||
__static_yoink("inflateInit2");
|
__static_yoink("_Cz_inflateInit2");
|
||||||
__static_yoink("inflate");
|
__static_yoink("_Cz_inflate");
|
||||||
__static_yoink("inflateEnd");
|
__static_yoink("_Cz_inflateEnd");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
|
2
third_party/zip/crc32.h
vendored
2
third_party/zip/crc32.h
vendored
|
@ -31,7 +31,7 @@
|
||||||
#ifndef USE_ZLIB
|
#ifndef USE_ZLIB
|
||||||
ZCONST ulg near *get_crc_table OF((void));
|
ZCONST ulg near *get_crc_table OF((void));
|
||||||
#endif
|
#endif
|
||||||
#if (1 || defined(USE_ZLIB) || defined(CRC_TABLE_ONLY))
|
#if (defined(USE_ZLIB) || defined(CRC_TABLE_ONLY))
|
||||||
# ifdef IZ_CRC_BE_OPTIMIZ
|
# ifdef IZ_CRC_BE_OPTIMIZ
|
||||||
# undef IZ_CRC_BE_OPTIMIZ
|
# undef IZ_CRC_BE_OPTIMIZ
|
||||||
# endif
|
# endif
|
||||||
|
|
10
third_party/zip/zipfile.c
vendored
10
third_party/zip/zipfile.c
vendored
|
@ -72,7 +72,7 @@
|
||||||
#include "libc/nt/winsock.h"
|
#include "libc/nt/winsock.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
unsigned crc32(unsigned crc, const unsigned char *buf, unsigned len);
|
unsigned _Cz_crc32(unsigned crc, const unsigned char *buf, unsigned len);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXX start of zipfile.h
|
* XXX start of zipfile.h
|
||||||
|
@ -867,7 +867,7 @@ local void read_Unicode_Path_entry(pZipListEntry)
|
||||||
}
|
}
|
||||||
strcpy(iname, pZipListEntry->iname);
|
strcpy(iname, pZipListEntry->iname);
|
||||||
|
|
||||||
chksum = crc32(chksum, (uch *)(iname), strlen(iname));
|
chksum = _Cz_crc32(chksum, (uch *)(iname), strlen(iname));
|
||||||
|
|
||||||
free(iname);
|
free(iname);
|
||||||
|
|
||||||
|
@ -972,7 +972,7 @@ local void read_Unicode_Path_local_entry(pZipListEntry)
|
||||||
}
|
}
|
||||||
strcpy(iname, pZipListEntry->iname);
|
strcpy(iname, pZipListEntry->iname);
|
||||||
|
|
||||||
chksum = crc32(chksum, (uch *)(iname), strlen(iname));
|
chksum = _Cz_crc32(chksum, (uch *)(iname), strlen(iname));
|
||||||
|
|
||||||
free(iname);
|
free(iname);
|
||||||
|
|
||||||
|
@ -1558,7 +1558,7 @@ local int add_Unicode_Path_local_extra_field(pZEntry)
|
||||||
# define inameLocal (pZEntry->iname)
|
# define inameLocal (pZEntry->iname)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
chksum = crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
chksum = _Cz_crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
||||||
|
|
||||||
#ifdef WIN32_OEM
|
#ifdef WIN32_OEM
|
||||||
free(inameLocal);
|
free(inameLocal);
|
||||||
|
@ -1685,7 +1685,7 @@ local int add_Unicode_Path_cen_extra_field(pZEntry)
|
||||||
# define inameLocal (pZEntry->iname)
|
# define inameLocal (pZEntry->iname)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
chksum = crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
chksum = _Cz_crc32(chksum, (uch *)(inameLocal), strlen(inameLocal));
|
||||||
|
|
||||||
#ifdef WIN32_OEM
|
#ifdef WIN32_OEM
|
||||||
free(inameLocal);
|
free(inameLocal);
|
||||||
|
|
4
third_party/zlib/zconf.h
vendored
4
third_party/zlib/zconf.h
vendored
|
@ -13,7 +13,6 @@
|
||||||
|
|
||||||
#define z_const const
|
#define z_const const
|
||||||
|
|
||||||
#if 0
|
|
||||||
#define Z_COSMO_PREFIX_SET
|
#define Z_COSMO_PREFIX_SET
|
||||||
|
|
||||||
#define Bytef _Cz_Bytef
|
#define Bytef _Cz_Bytef
|
||||||
|
@ -163,9 +162,6 @@
|
||||||
#define zlibCompileFlags _Cz_zlibCompileFlags
|
#define zlibCompileFlags _Cz_zlibCompileFlags
|
||||||
#define zlibVersion _Cz_zlibVersion
|
#define zlibVersion _Cz_zlibVersion
|
||||||
|
|
||||||
#pragma message "zconf is included, so zlibVersion should be renamed"
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef unsigned char Byte;
|
typedef unsigned char Byte;
|
||||||
typedef unsigned int uInt; /* 16 bits or more */
|
typedef unsigned int uInt; /* 16 bits or more */
|
||||||
|
|
Loading…
Reference in a new issue