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

Update third-party miniz to 0c30a001bc3c70 #8563

Merged
merged 5 commits into from
Feb 6, 2025
Merged
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
Prev Previous commit
miniz: do not define conditionally used functions
No need for static functions that are only used when
`MINIZ_NO_ARCHIVE_WRITING_APIS` is unset.
tautschnig committed Jan 13, 2025
commit 35bf91a5576dd8091ac0e0cd069e10a09f180991
6 changes: 6 additions & 0 deletions jbmc/src/miniz/miniz.cpp
Original file line number Diff line number Diff line change
@@ -3397,6 +3397,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
return MZ_TRUE;
}

#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
static MZ_FORCEINLINE mz_bool mz_zip_array_reserve(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_capacity, mz_uint growing)
{
if (new_capacity > pArray->m_capacity)
@@ -3406,6 +3407,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
}
return MZ_TRUE;
}
#endif

static MZ_FORCEINLINE mz_bool mz_zip_array_resize(mz_zip_archive *pZip, mz_zip_array *pArray, size_t new_size, mz_uint growing)
{
@@ -3418,6 +3420,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
return MZ_TRUE;
}

#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
static MZ_FORCEINLINE mz_bool mz_zip_array_ensure_room(mz_zip_archive *pZip, mz_zip_array *pArray, size_t n)
{
return mz_zip_array_reserve(pZip, pArray, pArray->m_size + n, MZ_TRUE);
@@ -3432,6 +3435,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
memcpy((mz_uint8 *)pArray->m_p + orig_size * pArray->m_element_size, pElements, n * pArray->m_element_size);
return MZ_TRUE;
}
#endif /* #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS */

#ifndef MINIZ_NO_TIME
static MZ_TIME_T mz_zip_dos_to_time_t(int dos_time, int dos_date)
@@ -5781,6 +5785,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
return n;
}

#ifndef MINIZ_NO_ARCHIVE_WRITING_APIS
static mz_bool mz_zip_writer_end_internal(mz_zip_archive *pZip, mz_bool set_last_error)
{
mz_zip_internal_state *pState;
@@ -7540,6 +7545,7 @@ static int mz_stat64(const char *path, struct __stat64 *buffer)
{
return mz_zip_writer_end_internal(pZip, MZ_TRUE);
}
#endif /* #ifndef MINIZ_NO_ARCHIVE_WRITING_APIS */

#ifndef MINIZ_NO_STDIO
mz_bool mz_zip_add_mem_to_archive_file_in_place(const char *pZip_filename, const char *pArchive_name, const void *pBuf, size_t buf_size, const void *pComment, mz_uint16 comment_size, mz_uint level_and_flags)