Module: wine Branch: master Commit: 30a1ed53d7a6680e48dce7db1a9fcfb9efe310bf URL: http://source.winehq.org/git/wine.git/?a=commit;h=30a1ed53d7a6680e48dce7db1a... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Jun 13 15:23:35 2012 +0200 msvcp90: Specify open mode in basic_ifstream<char> functions. --- dlls/msvcp90/ios.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c index a2bf8b0..d5949ff 100644 --- a/dlls/msvcp90/ios.c +++ b/dlls/msvcp90/ios.c @@ -5037,7 +5037,7 @@ basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_cha basic_ifstream_char_ctor(this, virt_init); - if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) { + if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) { basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); basic_ios_char_setstate(basic_ios, IOSTATE_failbit); } @@ -5046,6 +5046,8 @@ basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name(basic_ifstream_cha /* ??0?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QAE(a)PBGHH@Z */ /* ??0?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAA(a)PEBGHH@Z */ +/* ??0?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QAE(a)PB_WHH@Z */ +/* ??0?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAA(a)PEB_WHH@Z */ DEFINE_THISCALL_WRAPPER(basic_ifstream_char_ctor_name_wchar, 20) basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name_wchar(basic_ifstream_char *this, const wchar_t *name, int mode, int prot, MSVCP_bool virt_init) @@ -5054,7 +5056,7 @@ basic_ifstream_char* __thiscall basic_ifstream_char_ctor_name_wchar(basic_ifstre basic_ifstream_char_ctor(this, virt_init); - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) { + if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) { basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); basic_ios_char_setstate(basic_ios, IOSTATE_failbit); } @@ -5136,7 +5138,7 @@ void __thiscall basic_ifstream_char_open(basic_ifstream_char *this, { TRACE("(%p %s %d %d)\n", this, name, mode, prot); - if(!basic_filebuf_char_open(&this->filebuf, name, mode, prot)) { + if(!basic_filebuf_char_open(&this->filebuf, name, mode|OPENMODE_in, prot)) { basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); basic_ios_char_setstate(basic_ios, IOSTATE_failbit); } @@ -5146,20 +5148,22 @@ void __thiscall basic_ifstream_char_open(basic_ifstream_char *this, /* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAAXPEBDI(a)Z */ DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_old, 12) void __thiscall basic_ifstream_char_open_old(basic_ifstream_char *this, - const char *name, unsigned int mod) + const char *name, unsigned int mode) { - basic_ifstream_char_open(this, name, mod, _SH_DENYNO); + basic_ifstream_char_open(this, name, mode, _SH_DENYNO); } /* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QAEXPBGHH(a)Z */ /* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAAXPEBGHH(a)Z */ +/* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QAEXPB_WHH(a)Z */ +/* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAAXPEB_WHH(a)Z */ DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar, 16) void __thiscall basic_ifstream_char_open_wchar(basic_ifstream_char *this, const wchar_t *name, int mode, int prot) { TRACE("(%p %s %d %d)\n", this, debugstr_w(name), mode, prot); - if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode, prot)) { + if(!basic_filebuf_char_open_wchar(&this->filebuf, name, mode|OPENMODE_in, prot)) { basic_ios_char *basic_ios = basic_istream_char_get_basic_ios(&this->base); basic_ios_char_setstate(basic_ios, IOSTATE_failbit); } @@ -5167,6 +5171,8 @@ void __thiscall basic_ifstream_char_open_wchar(basic_ifstream_char *this, /* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QAEXPBGI(a)Z */ /* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAAXPEBGI(a)Z */ +/* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QAEXPB_WI(a)Z */ +/* ?open@?$basic_ifstream(a)DU?$char_traits(a)D@std@@@std@@QEAAXPEB_WI(a)Z */ DEFINE_THISCALL_WRAPPER(basic_ifstream_char_open_wchar_old, 12) void __thiscall basic_ifstream_char_open_wchar_old(basic_ifstream_char *this, const wchar_t *name, unsigned int mode)