cabinet: Use the proper fcntl defines in the FDI_OPEN calls.
This commit is contained in:
parent
75e9ae7ece
commit
d5ff728265
|
@ -33,6 +33,23 @@
|
|||
#define _S_IWRITE 0x0080
|
||||
#define _S_IREAD 0x0100
|
||||
|
||||
/* from msvcrt/fcntl.h */
|
||||
#define _O_RDONLY 0
|
||||
#define _O_WRONLY 1
|
||||
#define _O_RDWR 2
|
||||
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
||||
#define _O_APPEND 0x0008
|
||||
#define _O_RANDOM 0x0010
|
||||
#define _O_SEQUENTIAL 0x0020
|
||||
#define _O_TEMPORARY 0x0040
|
||||
#define _O_NOINHERIT 0x0080
|
||||
#define _O_CREAT 0x0100
|
||||
#define _O_TRUNC 0x0200
|
||||
#define _O_EXCL 0x0400
|
||||
#define _O_SHORT_LIVED 0x1000
|
||||
#define _O_TEXT 0x4000
|
||||
#define _O_BINARY 0x8000
|
||||
|
||||
#define CAB_SPLITMAX (10)
|
||||
|
||||
#define CAB_SEARCH_SIZE (32*1024)
|
||||
|
|
|
@ -37,13 +37,6 @@
|
|||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(cabinet);
|
||||
|
||||
/* the following defintions are copied from msvcrt/fcntl.h */
|
||||
|
||||
#define _O_RDONLY 0
|
||||
#define _O_WRONLY 1
|
||||
#define _O_RDWR 2
|
||||
#define _O_ACCMODE (_O_RDONLY|_O_WRONLY|_O_RDWR)
|
||||
|
||||
|
||||
/***********************************************************************
|
||||
* DllGetVersion (CABINET.2)
|
||||
|
|
|
@ -2128,7 +2128,7 @@ static int fdi_decomp(const struct fdi_file *fi, int savemode, fdi_decomp_state
|
|||
TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
|
||||
|
||||
/* try to get a handle to the cabfile */
|
||||
cabhf = PFDI_OPEN(CAB(hfdi), fullpath, 32768, _S_IREAD | _S_IWRITE);
|
||||
cabhf = PFDI_OPEN(CAB(hfdi), fullpath, _O_RDONLY|_O_BINARY, _S_IREAD | _S_IWRITE);
|
||||
if (cabhf == -1) {
|
||||
/* no file. allow the user to try again */
|
||||
fdin.fdie = FDIERROR_CABINET_NOT_FOUND;
|
||||
|
@ -2492,7 +2492,7 @@ BOOL __cdecl FDICopy(
|
|||
TRACE("full cab path/file name: %s\n", debugstr_a(fullpath));
|
||||
|
||||
/* get a handle to the cabfile */
|
||||
cabhf = PFDI_OPEN(hfdi, fullpath, 32768, _S_IREAD | _S_IWRITE);
|
||||
cabhf = PFDI_OPEN(hfdi, fullpath, _O_RDONLY|_O_BINARY, _S_IREAD | _S_IWRITE);
|
||||
if (cabhf == -1) {
|
||||
PFDI_INT(hfdi)->perf->erfOper = FDIERROR_CABINET_NOT_FOUND;
|
||||
PFDI_INT(hfdi)->perf->erfType = ERROR_FILE_NOT_FOUND;
|
||||
|
|
Loading…
Reference in New Issue