Align structures for 64-bit platforms (stream_split, mz_opt, crypt_sha, crypt_hmac)

- mz_stream_split 120 -> 104 bytes
- minizip_opt 32 -> 24 bytes
- mz_crypt_sha 32 -> 24 bytes
- mz_crypt_hmac 40 -> 32 bytes
This commit is contained in:
Herman Semenov 2025-03-12 05:29:27 +03:00 committed by Nathan Moinvaziri
parent dd91a4db20
commit e6eeb4ea52
3 changed files with 6 additions and 6 deletions

View File

@ -23,16 +23,16 @@
/***************************************************************************/ /***************************************************************************/
typedef struct minizip_opt_s { typedef struct minizip_opt_s {
int64_t disk_size;
int32_t encoding;
uint8_t include_path; uint8_t include_path;
int16_t compress_level; int16_t compress_level;
uint8_t compress_method; uint8_t compress_method;
uint8_t overwrite; uint8_t overwrite;
uint8_t append; uint8_t append;
int64_t disk_size;
uint8_t follow_links; uint8_t follow_links;
uint8_t store_links; uint8_t store_links;
uint8_t zip_cd; uint8_t zip_cd;
int32_t encoding;
uint8_t verbose; uint8_t verbose;
uint8_t aes; uint8_t aes;
} minizip_opt; } minizip_opt;

View File

@ -64,8 +64,8 @@ typedef struct mz_crypt_sha_s {
#else #else
EVP_MD_CTX *ctx; EVP_MD_CTX *ctx;
#endif #endif
int32_t initialized;
unsigned long error; unsigned long error;
int32_t initialized;
uint16_t algorithm; uint16_t algorithm;
} mz_crypt_sha; } mz_crypt_sha;
@ -491,8 +491,8 @@ typedef struct mz_crypt_hmac_s {
EVP_MAC *mac; EVP_MAC *mac;
EVP_MAC_CTX *ctx; EVP_MAC_CTX *ctx;
#endif #endif
int32_t initialized;
unsigned long error; unsigned long error;
int32_t initialized;
uint16_t algorithm; uint16_t algorithm;
} mz_crypt_hmac; } mz_crypt_hmac;

View File

@ -35,19 +35,19 @@ static mz_stream_vtbl mz_stream_split_vtbl = {
typedef struct mz_stream_split_s { typedef struct mz_stream_split_s {
mz_stream stream; mz_stream stream;
int32_t is_open;
int64_t disk_size; int64_t disk_size;
int64_t total_in; int64_t total_in;
int64_t total_in_disk; int64_t total_in_disk;
int64_t total_out; int64_t total_out;
int64_t total_out_disk; int64_t total_out_disk;
int32_t is_open;
int32_t mode; int32_t mode;
char *path_cd; char *path_cd;
char *path_disk; char *path_disk;
uint32_t path_disk_size; uint32_t path_disk_size;
int32_t number_disk; int32_t number_disk;
int32_t current_disk;
int64_t current_disk_size; int64_t current_disk_size;
int32_t current_disk;
int32_t reached_end; int32_t reached_end;
} mz_stream_split; } mz_stream_split;