mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 07:20:36 +00:00
(7zip) Use int64_t
This commit is contained in:
parent
110882903c
commit
84a83ef43c
4
deps/7zip/7zArcIn.c
vendored
4
deps/7zip/7zArcIn.c
vendored
@ -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 ||
|
||||
|
6
deps/7zip/7zFile.c
vendored
6
deps/7zip/7zFile.c
vendored
@ -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);
|
||||
|
6
deps/7zip/7zTypes.h
vendored
6
deps/7zip/7zTypes.h
vendored
@ -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)
|
||||
|
||||
|
2
deps/7zip/LzmaEnc.c
vendored
2
deps/7zip/LzmaEnc.c
vendored
@ -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;
|
||||
}
|
||||
|
2
deps/7zip/LzmaEnc.h
vendored
2
deps/7zip/LzmaEnc.h
vendored
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user