Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Deps/Zlib): move to Cloudflare fork #21028

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions deps/PackageList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ utf8-cpp (UTF-8 with C++ in a Portable Way)
http://utfcpp.sourceforge.net/
Version: 2.3.4

zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library)
http://www.zlib.net/
Version: 1.2.12
zlib (A Massively Spiffy Yet Delicately Unobtrusive Compression Library - fork of Cloudflare)
https://github.com/cloudflare/zlib (based on http://www.zlib.net/)
Version: 23-12-2024

gSOAP (a portable development toolkit for C and C++ XML Web services and XML data bindings)
http://gsoap2.sourceforge.net/
Expand Down
4 changes: 2 additions & 2 deletions deps/g3dlite/source/BinaryInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ BinaryInput::BinaryInput(
debugAssert(m_freeBuffer);
m_buffer = (uint8*)System::alignedMalloc(m_length, 16);

unsigned long L = (unsigned long)m_length;
uint64_t L = (uint64_t)m_length;
// Decompress with zlib
int64 result = uncompress(m_buffer, &L, data + 4, (uLong)dataLen - 4);
m_length = L;
Expand Down Expand Up @@ -257,7 +257,7 @@ void BinaryInput::decompress() {
debugAssert(isValidHeapPointer(tempBuffer));
debugAssert(isValidHeapPointer(m_buffer));

unsigned long L = (unsigned long)m_length;
uint64_t L = (uint64_t)m_length;
int64 result = (int64)uncompress(m_buffer, &L, tempBuffer + 4, (uLong)tempLength - 4);
m_length = L;
m_bufferLength = m_length;
Expand Down
2 changes: 1 addition & 1 deletion deps/g3dlite/source/BinaryOutput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ void BinaryOutput::compress(int level) {
alwaysAssertM(m_bufferLen < 0xFFFFFFFF, "Compress only works for 32-bit files.");

// This is the worst-case size, as mandated by zlib
unsigned long compressedSize = iCeil(m_bufferLen * 1.001) + 12;
uint64_t compressedSize = iCeil(m_bufferLen * 1.001) + 12;

// Save the old buffer and reallocate to the worst-case size
const uint8* src = m_buffer;
Expand Down
41 changes: 14 additions & 27 deletions deps/zlib/adler32.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

#include "zutil.h"

local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));

#define BASE 65521U /* largest prime smaller than 65536 */
#define NMAX 5552
/* NMAX is the largest n such that 255n(n+1)/2 + (n+1)(BASE-1) <= 2^32-1 */
Expand Down Expand Up @@ -59,15 +57,20 @@ local uLong adler32_combine_ OF((uLong adler1, uLong adler2, z_off64_t len2));
# define MOD63(a) a %= BASE
#endif

#if defined(ADLER32_SIMD_NEON) || defined (ADLER32_SIMD_SSSE3)
#include "adler32_simd.h"
#endif

/* ========================================================================= */
uLong ZEXPORT adler32_z(adler, buf, len)
uLong adler;
const Bytef *buf;
z_size_t len;
{
uLong ZEXPORT adler32_z(uLong adler, const Bytef *buf, z_size_t len) {
unsigned long sum2;
unsigned n;

#if defined(ADLER32_SIMD_NEON) || defined(ADLER32_SIMD_SSSE3)
if (buf && len >= 64)
return adler32_simd_(adler, buf, len);
#endif

/* split Adler-32 into component sums */
sum2 = (adler >> 16) & 0xffff;
adler &= 0xffff;
Expand Down Expand Up @@ -131,20 +134,12 @@ uLong ZEXPORT adler32_z(adler, buf, len)
}

/* ========================================================================= */
uLong ZEXPORT adler32(adler, buf, len)
uLong adler;
const Bytef *buf;
uInt len;
{
uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) {
return adler32_z(adler, buf, len);
}

/* ========================================================================= */
local uLong adler32_combine_(adler1, adler2, len2)
uLong adler1;
uLong adler2;
z_off64_t len2;
{
local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2) {
unsigned long sum1;
unsigned long sum2;
unsigned rem;
Expand All @@ -169,18 +164,10 @@ local uLong adler32_combine_(adler1, adler2, len2)
}

/* ========================================================================= */
uLong ZEXPORT adler32_combine(adler1, adler2, len2)
uLong adler1;
uLong adler2;
z_off_t len2;
{
uLong ZEXPORT adler32_combine(uLong adler1, uLong adler2, z_off_t len2) {
return adler32_combine_(adler1, adler2, len2);
}

uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
uLong adler1;
uLong adler2;
z_off64_t len2;
{
uLong ZEXPORT adler32_combine64(uLong adler1, uLong adler2, z_off64_t len2) {
return adler32_combine_(adler1, adler2, len2);
}
Loading