diff options
Diffstat (limited to 'libs/zlib/src/ioapi.c')
-rw-r--r-- | libs/zlib/src/ioapi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libs/zlib/src/ioapi.c b/libs/zlib/src/ioapi.c index 8698d61365..8fcdcbfcb3 100644 --- a/libs/zlib/src/ioapi.c +++ b/libs/zlib/src/ioapi.c @@ -34,7 +34,7 @@ voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode);
else
{
- return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode);
+ return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const wchar_t*)filename,mode);
}
}
@@ -84,7 +84,7 @@ void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filef -static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode));
+static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const wchar_t* filename, int mode));
static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size));
static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream));
@@ -92,41 +92,41 @@ static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPO static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream));
static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream));
-static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode)
+static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const wchar_t* filename, int mode)
{
FILE* file = NULL;
- const char* mode_fopen = NULL;
+ const wchar_t* mode_fopen = NULL;
(void)opaque;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
+ mode_fopen = L"rb";
else
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
+ mode_fopen = L"r+b";
else
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
+ mode_fopen = L"wb";
if ((filename!=NULL) && (mode_fopen != NULL))
- file = fopen(filename, mode_fopen);
+ file = _wfopen(filename, mode_fopen);
return file;
}
static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode)
{
FILE* file = NULL;
- const char* mode_fopen = NULL;
+ const wchar_t* mode_fopen = NULL;
(void)opaque;
if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ)
- mode_fopen = "rb";
+ mode_fopen = L"rb";
else
if (mode & ZLIB_FILEFUNC_MODE_EXISTING)
- mode_fopen = "r+b";
+ mode_fopen = L"r+b";
else
if (mode & ZLIB_FILEFUNC_MODE_CREATE)
- mode_fopen = "wb";
+ mode_fopen = L"wb";
if ((filename!=NULL) && (mode_fopen != NULL))
- file = FOPEN_FUNC((const char*)filename, mode_fopen);
+ file = _wfopen((const wchar_t*)filename, mode_fopen);
return file;
}
|