summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/lzma/C/7zFile.h
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/lzma/C/7zFile.h')
-rw-r--r--3rdparty/lzma/C/7zFile.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/3rdparty/lzma/C/7zFile.h b/3rdparty/lzma/C/7zFile.h
index 658987ed51a..788abb6b9db 100644
--- a/3rdparty/lzma/C/7zFile.h
+++ b/3rdparty/lzma/C/7zFile.h
@@ -1,17 +1,20 @@
/* 7zFile.h -- File IO
-2013-01-18 : Igor Pavlov : Public domain */
+2021-02-15 : Igor Pavlov : Public domain */
#ifndef __7Z_FILE_H
#define __7Z_FILE_H
#ifdef _WIN32
#define USE_WINDOWS_FILE
+// #include <windows.h>
#endif
#ifdef USE_WINDOWS_FILE
#include <windows.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 +27,10 @@ typedef struct
{
#ifdef USE_WINDOWS_FILE
HANDLE handle;
- #else
+ #elif defined(USE_FOPEN)
FILE *file;
+ #else
+ int fd;
#endif
} CSzFile;
@@ -54,8 +59,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 +69,9 @@ void FileSeqInStream_CreateVTable(CFileSeqInStream *p);
typedef struct
{
- ISeekInStream s;
+ ISeekInStream vt;
CSzFile file;
+ WRes wres;
} CFileInStream;
void FileInStream_CreateVTable(CFileInStream *p);
@@ -72,8 +79,9 @@ void FileInStream_CreateVTable(CFileInStream *p);
typedef struct
{
- ISeqOutStream s;
+ ISeqOutStream vt;
CSzFile file;
+ WRes wres;
} CFileOutStream;
void FileOutStream_CreateVTable(CFileOutStream *p);