Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pavlov <ipavlov@users.sourceforge.net>2009-12-14 03:00:00 +0300
committerKornel LesiƄski <kornel@geekhood.net>2016-05-28 02:16:01 +0300
commit1fbaf0aac5000ca563a1ee2bb15ba6821a08e468 (patch)
treeec079944edffd096355ecb0c499f889364aefb4b /C/7zFile.c
parent2fed8721946901375d21d4a506fe8b114045b397 (diff)
9.09 beta
Diffstat (limited to 'C/7zFile.c')
-rwxr-xr-xC/7zFile.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/C/7zFile.c b/C/7zFile.c
index 299e0c47..a66c9e9d 100755
--- a/C/7zFile.c
+++ b/C/7zFile.c
@@ -1,15 +1,15 @@
/* 7zFile.c -- File IO
-2009-08-16 : Igor Pavlov : Public domain */
+2009-11-24 : Igor Pavlov : Public domain */
#include "7zFile.h"
#ifndef USE_WINDOWS_FILE
+#ifndef UNDER_CE
#include <errno.h>
-
#endif
-#ifdef USE_WINDOWS_FILE
+#else
/*
ReadFile and WriteFile functions in Windows have BUG:
@@ -34,6 +34,7 @@ void File_Construct(CSzFile *p)
#endif
}
+#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE)
static WRes File_Open(CSzFile *p, const char *name, int writeMode)
{
#ifdef USE_WINDOWS_FILE
@@ -45,12 +46,18 @@ static WRes File_Open(CSzFile *p, const char *name, int writeMode)
return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError();
#else
p->file = fopen(name, writeMode ? "wb+" : "rb");
- return (p->file != 0) ? 0 : errno;
+ return (p->file != 0) ? 0 :
+ #ifdef UNDER_CE
+ 2; /* ENOENT */
+ #else
+ errno;
+ #endif
#endif
}
WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); }
WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); }
+#endif
#ifdef USE_WINDOWS_FILE
static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode)