From 84a83ef43c2a598160071ed486e4ba651d49c7a6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 7 Aug 2021 03:26:08 +0200 Subject: [PATCH] (7zip) Use int64_t --- deps/7zip/7zArcIn.c | 4 ++-- deps/7zip/7zFile.c | 6 +++--- deps/7zip/7zTypes.h | 6 +++--- deps/7zip/LzmaEnc.c | 2 +- deps/7zip/LzmaEnc.h | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/deps/7zip/7zArcIn.c b/deps/7zip/7zArcIn.c index e2adaf5ed3..94d4680dae 100644 --- a/deps/7zip/7zArcIn.c +++ b/deps/7zip/7zArcIn.c @@ -1505,7 +1505,7 @@ static SRes SzArEx_Open2( ISzAllocPtr allocTemp) { Byte header[k7zStartHeaderSize]; - Int64 startArcPos; + int64_t startArcPos; uint64_t nextHeaderOffset, nextHeaderSize; size_t nextHeaderSizeT; uint32_t nextHeaderCRC; @@ -1541,7 +1541,7 @@ static SRes SzArEx_Open2( return SZ_ERROR_NO_ARCHIVE; { - Int64 pos = 0; + int64_t pos = 0; RINOK(ILookInStream_Seek(inStream, &pos, SZ_SEEK_END)); if ((uint64_t)pos < startArcPos + nextHeaderOffset || (uint64_t)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || diff --git a/deps/7zip/7zFile.c b/deps/7zip/7zFile.c index 04365c5750..34b1982d99 100644 --- a/deps/7zip/7zFile.c +++ b/deps/7zip/7zFile.c @@ -166,7 +166,7 @@ WRes File_Write(CSzFile *p, const void *data, size_t *size) #endif } -WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin) +WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin) { #ifdef USE_WINDOWS_FILE @@ -188,7 +188,7 @@ WRes File_Seek(CSzFile *p, Int64 *pos, ESzSeek origin) if (res != NO_ERROR) return res; } - *pos = ((Int64)value.HighPart << 32) | value.LowPart; + *pos = ((int64_t)value.HighPart << 32) | value.LowPart; return 0; #else @@ -258,7 +258,7 @@ static SRes FileInStream_Read(const ISeekInStream *pp, void *buf, size_t *size) return (File_Read(&p->file, buf, size) == 0) ? SZ_OK : SZ_ERROR_READ; } -static SRes FileInStream_Seek(const ISeekInStream *pp, Int64 *pos, ESzSeek origin) +static SRes FileInStream_Seek(const ISeekInStream *pp, int64_t *pos, ESzSeek origin) { CFileInStream *p = CONTAINER_FROM_VTBL(pp, CFileInStream, vt); return File_Seek(&p->file, pos, origin); diff --git a/deps/7zip/7zTypes.h b/deps/7zip/7zTypes.h index f66a5f65cd..89e3b72e95 100644 --- a/deps/7zip/7zTypes.h +++ b/deps/7zip/7zTypes.h @@ -188,7 +188,7 @@ typedef struct ISeekInStream ISeekInStream; struct ISeekInStream { SRes (*Read)(const ISeekInStream *p, void *buf, size_t *size); /* same as ISeqInStream::Read */ - SRes (*Seek)(const ISeekInStream *p, Int64 *pos, ESzSeek origin); + SRes (*Seek)(const ISeekInStream *p, int64_t *pos, ESzSeek origin); }; #define ISeekInStream_Read(p, buf, size) (p)->Read(p, buf, size) #define ISeekInStream_Seek(p, pos, origin) (p)->Seek(p, pos, origin) @@ -206,7 +206,7 @@ struct ILookInStream SRes (*Read)(const ILookInStream *p, void *buf, size_t *size); /* reads directly (without buffer). It's same as ISeqInStream::Read */ - SRes (*Seek)(const ILookInStream *p, Int64 *pos, ESzSeek origin); + SRes (*Seek)(const ILookInStream *p, int64_t *pos, ESzSeek origin); }; #define ILookInStream_Look(p, buf, size) (p)->Look(p, buf, size) @@ -267,7 +267,7 @@ struct ICompressProgress { SRes (*Progress)(const ICompressProgress *p, uint64_t inSize, uint64_t outSize); /* Returns: result. (result != SZ_OK) means break. - Value (uint64_t)(Int64)-1 for size means unknown value. */ + Value (uint64_t)(int64_t)-1 for size means unknown value. */ }; #define ICompressProgress_Progress(p, inSize, outSize) (p)->Progress(p, inSize, outSize) diff --git a/deps/7zip/LzmaEnc.c b/deps/7zip/LzmaEnc.c index b3898557fd..3fb17bc53c 100644 --- a/deps/7zip/LzmaEnc.c +++ b/deps/7zip/LzmaEnc.c @@ -44,7 +44,7 @@ void LzmaEncProps_Init(CLzmaEncProps *p) { p->level = 5; p->dictSize = p->mc = 0; - p->reduceSize = (uint64_t)(Int64)-1; + p->reduceSize = (uint64_t)(int64_t)-1; p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; p->writeEndMark = 0; } diff --git a/deps/7zip/LzmaEnc.h b/deps/7zip/LzmaEnc.h index 44b8967844..12e3588d52 100644 --- a/deps/7zip/LzmaEnc.h +++ b/deps/7zip/LzmaEnc.h @@ -27,7 +27,7 @@ typedef struct _CLzmaEncProps unsigned writeEndMark; /* 0 - do not write EOPM, 1 - write EOPM, default = 0 */ int numThreads; /* 1 or 2, default = 2 */ - uint64_t reduceSize; /* estimated size of data that will be compressed. default = (uint64_t)(Int64)-1. + uint64_t reduceSize; /* estimated size of data that will be compressed. default = (uint64_t)(int64_t)-1. Encoder uses this value to reduce dictionary size */ } CLzmaEncProps;