diff options
Diffstat (limited to '3rdparty/lzma/C/7zFile.h')
-rw-r--r-- | 3rdparty/lzma/C/7zFile.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/3rdparty/lzma/C/7zFile.h b/3rdparty/lzma/C/7zFile.h index 658987ed51a..f5069cd9ee2 100644 --- a/3rdparty/lzma/C/7zFile.h +++ b/3rdparty/lzma/C/7zFile.h @@ -1,17 +1,21 @@ /* 7zFile.h -- File IO -2013-01-18 : Igor Pavlov : Public domain */ +2023-03-05 : Igor Pavlov : Public domain */ -#ifndef __7Z_FILE_H -#define __7Z_FILE_H +#ifndef ZIP7_INC_FILE_H +#define ZIP7_INC_FILE_H #ifdef _WIN32 #define USE_WINDOWS_FILE +// #include <windows.h> #endif #ifdef USE_WINDOWS_FILE -#include <windows.h> +#include "7zWindows.h" + #else -#include <stdio.h> +// note: USE_FOPEN mode is limited to 32-bit file size +// #define USE_FOPEN +// #include <stdio.h> #endif #include "7zTypes.h" @@ -24,8 +28,10 @@ typedef struct { #ifdef USE_WINDOWS_FILE HANDLE handle; - #else + #elif defined(USE_FOPEN) FILE *file; + #else + int fd; #endif } CSzFile; @@ -54,8 +60,9 @@ WRes File_GetLength(CSzFile *p, UInt64 *length); typedef struct { - ISeqInStream s; + ISeqInStream vt; CSzFile file; + WRes wres; } CFileSeqInStream; void FileSeqInStream_CreateVTable(CFileSeqInStream *p); @@ -63,8 +70,9 @@ void FileSeqInStream_CreateVTable(CFileSeqInStream *p); typedef struct { - ISeekInStream s; + ISeekInStream vt; CSzFile file; + WRes wres; } CFileInStream; void FileInStream_CreateVTable(CFileInStream *p); @@ -72,8 +80,9 @@ void FileInStream_CreateVTable(CFileInStream *p); typedef struct { - ISeqOutStream s; + ISeqOutStream vt; CSzFile file; + WRes wres; } CFileOutStream; void FileOutStream_CreateVTable(CFileOutStream *p); |