mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
Fix CXX_BUILD
This commit is contained in:
parent
5d0b01ea07
commit
258d219aaa
22
deps/7zip/7zFile.c
vendored
22
deps/7zip/7zFile.c
vendored
@ -42,7 +42,7 @@ WRes File_Close(CSzFile *p)
|
|||||||
{
|
{
|
||||||
if (p->file)
|
if (p->file)
|
||||||
{
|
{
|
||||||
int res = rfclose(p->file);
|
int res = rfclose((RFILE*)p->file);
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
return res;
|
return res;
|
||||||
p->file = NULL;
|
p->file = NULL;
|
||||||
@ -56,10 +56,10 @@ WRes File_Read(CSzFile *p, void *data, size_t *size)
|
|||||||
if (originalSize == 0)
|
if (originalSize == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
*size = rfread(data, 1, originalSize, p->file);
|
*size = rfread(data, 1, originalSize, (RFILE*)p->file);
|
||||||
if (*size == originalSize)
|
if (*size == originalSize)
|
||||||
return 0;
|
return 0;
|
||||||
return rferror(p->file);
|
return rferror((RFILE*)p->file);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRes File_Write(CSzFile *p, const void *data, size_t *size)
|
WRes File_Write(CSzFile *p, const void *data, size_t *size)
|
||||||
@ -68,10 +68,10 @@ WRes File_Write(CSzFile *p, const void *data, size_t *size)
|
|||||||
if (originalSize == 0)
|
if (originalSize == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
*size = rfwrite(data, 1, originalSize, p->file);
|
*size = rfwrite(data, 1, originalSize, (RFILE*)p->file);
|
||||||
if (*size == originalSize)
|
if (*size == originalSize)
|
||||||
return 0;
|
return 0;
|
||||||
return rferror(p->file);
|
return rferror((RFILE*)p->file);
|
||||||
}
|
}
|
||||||
|
|
||||||
WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin)
|
WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin)
|
||||||
@ -92,17 +92,17 @@ WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin)
|
|||||||
default:
|
default:
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
res = rfseek(p->file, (int64_t)*pos, whence);
|
res = rfseek((RFILE*)p->file, (int64_t)*pos, whence);
|
||||||
*pos = rftell(p->file);
|
*pos = rftell((RFILE*)p->file);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
WRes File_GetLength(CSzFile *p, uint64_t *length)
|
WRes File_GetLength(CSzFile *p, uint64_t *length)
|
||||||
{
|
{
|
||||||
int64_t pos = rftell(p->file);
|
int64_t pos = rftell((RFILE*)p->file);
|
||||||
int64_t res = rfseek(p->file, 0, SEEK_END);
|
int64_t res = rfseek((RFILE*)p->file, 0, SEEK_END);
|
||||||
*length = rftell(p->file);
|
*length = rftell((RFILE*)p->file);
|
||||||
rfseek(p->file, pos, SEEK_SET);
|
rfseek((RFILE*)p->file, pos, SEEK_SET);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user