This patch make it possible to play Tron 2.0.
Signed-off-by: Arkadiusz Hiler <ahiler(a)codeweavers.com>
---
v3: rebase on top of current master - _mtlock tests changed the context so the
patch didn't apply anymore
v2:
* msvcrt20 & msvcrt40
* fixed ??_Efstream@@UAEPAXI@Z
* include iostream in rtti hierarchy
dlls/msvcirt/msvcirt.c | 37 ++++++++++++++++++
dlls/msvcirt/msvcirt.spec | 22 +++++------
dlls/msvcirt/tests/msvcirt.c | 74 ++++++++++++++++++++++++++++++++++++
dlls/msvcrt20/msvcrt20.spec | 26 ++++++-------
dlls/msvcrt40/msvcrt40.spec | 18 ++++-----
5 files changed, 143 insertions(+), 33 deletions(-)
diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index 170dcee462a..99ce1d929c0 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -200,6 +200,8 @@ extern const vtable_ptr MSVCP_iostream_vtable;
extern const vtable_ptr MSVCP_strstream_vtable;
/* ??_7stdiostream@@6B@ */
extern const vtable_ptr MSVCP_stdiostream_vtable;
+/* ??_7fstream@@6B@ */
+extern const vtable_ptr MSVCP_fstream_vtable;
__ASM_BLOCK_BEGIN(vtables)
__ASM_VTABLE(streambuf,
@@ -272,6 +274,8 @@ __ASM_BLOCK_BEGIN(vtables)
VTABLE_ADD_FUNC(iostream_vector_dtor));
__ASM_VTABLE(stdiostream,
VTABLE_ADD_FUNC(iostream_vector_dtor));
+ __ASM_VTABLE(fstream,
+ VTABLE_ADD_FUNC(iostream_vector_dtor));
__ASM_BLOCK_END
#define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
@@ -321,6 +325,9 @@ DEFINE_RTTI_DATA5(strstream, sizeof(iostream), &iostream_rtti_base_descriptor,
DEFINE_RTTI_DATA5(stdiostream, sizeof(iostream), &iostream_rtti_base_descriptor,
&istream_rtti_base_descriptor, &ios_rtti_base_descriptor,
&ostream_rtti_base_descriptor, &ios_rtti_base_descriptor, ".?AVstdiostream@@")
+DEFINE_RTTI_DATA5(fstream, sizeof(iostream), &iostream_rtti_base_descriptor,
+ &istream_rtti_base_descriptor, &ios_rtti_base_descriptor,
+ &ostream_rtti_base_descriptor, &ios_rtti_base_descriptor, ".?AVfstream@@")
/* ?cin@@3Vistream_withassign@@A */
struct {
@@ -4369,6 +4376,8 @@ iostream* __thiscall iostream_copy_ctor(iostream *this, const iostream *copy, BO
/* ??1stdiostream@@UEAA@XZ */
/* ??1strstream@@UAE@XZ */
/* ??1strstream@@UEAA@XZ */
+/* ??1fstream@@UAE@XZ */
+/* ??1fstream@@UEAA@XZ */
DEFINE_THISCALL_WRAPPER(iostream_dtor, 4)
void __thiscall iostream_dtor(ios *base)
{
@@ -4601,6 +4610,32 @@ stdiobuf* __thiscall stdiostream_rdbuf(const iostream *this)
return (stdiobuf*) istream_get_ios(&this->base1)->sb;
}
+/* ??0fstream@@QAE@PBDHH@Z */
+/* ??0fstream@@QEAA@PEBDHH@Z */
+DEFINE_THISCALL_WRAPPER(fstream_open_ctor, 20)
+iostream* __thiscall fstream_open_ctor(iostream *this, const char *name, ios_open_mode mode, int protection, BOOL virt_init)
+{
+ ios *base;
+ filebuf *fb = MSVCRT_operator_new(sizeof(filebuf));
+
+ TRACE("(%p %s %d %d %d)\n", this, name, mode, protection, virt_init);
+
+ if (!fb) {
+ FIXME("out of memory\n");
+ return NULL;
+ }
+
+ filebuf_ctor(fb);
+ filebuf_open(fb, name, mode, protection);
+
+ iostream_internal_sb_ctor(this, &fb->base, &MSVCP_fstream_vtable, virt_init);
+
+ base = istream_get_ios(&this->base1);
+ base->delbuf = 1;
+
+ return this;
+}
+
/* ??0Iostream_init@@QAE@AAVios@@H@Z */
/* ??0Iostream_init@@QEAA@AEAVios@@H@Z */
DEFINE_THISCALL_WRAPPER(Iostream_init_ios_ctor, 12)
@@ -4771,6 +4806,7 @@ static void init_io(void *base)
init_iostream_rtti(base);
init_strstream_rtti(base);
init_stdiostream_rtti(base);
+ init_fstream_rtti(base);
#endif
if ((fb = MSVCRT_operator_new(sizeof(filebuf)))) {
diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec
index 4e8f221b2c0..0842b143141 100644
--- a/dlls/msvcirt/msvcirt.spec
+++ b/dlls/msvcirt/msvcirt.spec
@@ -22,8 +22,8 @@
@ stub -arch=win64 ??0fstream@@QEAA@H@Z
@ stub -arch=win32 ??0fstream@@QAE@HPADH@Z # __thiscall fstream::fstream(int,char *,int)
@ stub -arch=win64 ??0fstream@@QEAA@HPEADH@Z
-@ stub -arch=win32 ??0fstream@@QAE@PBDHH@Z # __thiscall fstream::fstream(char const *,int,int)
-@ stub -arch=win64 ??0fstream@@QEAA@PEBDHH@Z
+@ thiscall -arch=win32 ??0fstream@@QAE@PBDHH@Z(ptr str long long long) fstream_open_ctor
+@ cdecl -arch=win64 ??0fstream@@QEAA@PEBDHH@Z(ptr str long long long) fstream_open_ctor
@ stub -arch=win32 ??0fstream@@QAE@XZ # __thiscall fstream::fstream(void)
@ stub -arch=win64 ??0fstream@@QEAA@XZ
@ thiscall -arch=win32 ??0ifstream@@QAE@ABV0@@Z(ptr ptr long) ifstream_copy_ctor
@@ -136,8 +136,8 @@
@ cdecl -arch=win64 ??1exception@@UEAA@XZ(ptr) MSVCP_exception_dtor
@ thiscall -arch=win32 ??1filebuf@@UAE@XZ(ptr) filebuf_dtor
@ cdecl -arch=win64 ??1filebuf@@UEAA@XZ(ptr) filebuf_dtor
-@ stub -arch=win32 ??1fstream@@UAE@XZ # virtual __thiscall fstream::~fstream(void)
-@ stub -arch=win64 ??1fstream@@UEAA@XZ
+@ thiscall -arch=win32 ??1fstream@@UAE@XZ(ptr) iostream_dtor
+@ cdecl -arch=win64 ??1fstream@@UEAA@XZ(ptr) iostream_dtor
@ thiscall -arch=win32 ??1ifstream@@UAE@XZ(ptr) istream_dtor
@ cdecl -arch=win64 ??1ifstream@@UEAA@XZ(ptr) istream_dtor
@ thiscall -arch=win32 ??1ios@@UAE@XZ(ptr) ios_dtor
@@ -304,7 +304,7 @@
@ cdecl -arch=win64 ??Bios@@QEBAPEAXXZ(ptr) ios_op_void
@ extern ??_7exception@@6B@ MSVCP_exception_vtable
@ extern ??_7filebuf@@6B@ MSVCP_filebuf_vtable
-# @ extern ??_7fstream@@6B@ # const fstream::`vftable'
+@ extern ??_7fstream@@6B@ MSVCP_fstream_vtable
@ extern ??_7ifstream@@6B@ MSVCP_ifstream_vtable
@ extern ??_7ios@@6B@ MSVCP_ios_vtable
@ extern ??_7iostream@@6B@ MSVCP_iostream_vtable
@@ -321,8 +321,8 @@
@ extern ??_7streambuf@@6B@ MSVCP_streambuf_vtable
@ extern ??_7strstream@@6B@ MSVCP_strstream_vtable
@ extern ??_7strstreambuf@@6B@ MSVCP_strstreambuf_vtable
-# @ extern ??_8fstream@@7Bistream@@@ # const fstream::`vbtable'{for `istream'}
-# @ extern ??_8fstream@@7Bostream@@@ # const fstream::`vbtable'{for `ostream'}
+@ extern ??_8fstream@@7Bistream@@@ iostream_vbtable_istream
+@ extern ??_8fstream@@7Bostream@@@ iostream_vbtable_ostream
@ extern ??_8ifstream@@7B@ istream_vbtable
@ extern ??_8iostream@@7Bistream@@@ iostream_vbtable_istream
@ extern ??_8iostream@@7Bostream@@@ iostream_vbtable_ostream
@@ -337,8 +337,8 @@
@ extern ??_8stdiostream@@7Bostream@@@ iostream_vbtable_ostream
@ extern ??_8strstream@@7Bistream@@@ iostream_vbtable_istream
@ extern ??_8strstream@@7Bostream@@@ iostream_vbtable_ostream
-@ stub -arch=win32 ??_Dfstream@@QAEXXZ # void __thiscall fstream::`vbase destructor'(void)
-@ stub -arch=win64 ??_Dfstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dfstream@@QAEXXZ(ptr) iostream_vbase_dtor
+@ cdecl -arch=win64 ??_Dfstream@@QEAAXXZ(ptr) iostream_vbase_dtor
@ thiscall -arch=win32 ??_Difstream@@QAEXXZ(ptr) istream_vbase_dtor
@ cdecl -arch=win64 ??_Difstream@@QEAAXXZ(ptr) istream_vbase_dtor
@ thiscall -arch=win32 ??_Diostream@@QAEXXZ(ptr) iostream_vbase_dtor
@@ -363,7 +363,7 @@
@ cdecl -arch=win64 ??_Dstrstream@@QEAAXXZ(ptr) iostream_vbase_dtor
@ thiscall -arch=win32 ??_Eexception@@UAEPAXI@Z(ptr long) MSVCP_exception_vector_dtor
@ thiscall -arch=win32 ??_Efilebuf@@UAEPAXI@Z(ptr long) filebuf_vector_dtor
-@ stub -arch=win32 ??_Efstream@@UAEPAXI@Z # virtual void * __thiscall fstream::`vector deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Efstream@@UAEPAXI@Z(ptr long) iostream_vector_dtor
@ thiscall -arch=win32 ??_Eifstream@@UAEPAXI@Z(ptr long) istream_vector_dtor
@ thiscall -arch=win32 ??_Eios@@UAEPAXI@Z(ptr long) ios_vector_dtor
@ thiscall -arch=win32 ??_Eiostream@@UAEPAXI@Z(ptr long) iostream_vector_dtor
@@ -382,7 +382,7 @@
@ thiscall -arch=win32 ??_Estrstreambuf@@UAEPAXI@Z(ptr long) strstreambuf_vector_dtor
@ thiscall -arch=win32 ??_Gexception@@UAEPAXI@Z(ptr long) MSVCP_exception_scalar_dtor
@ thiscall -arch=win32 ??_Gfilebuf@@UAEPAXI@Z(ptr long) filebuf_scalar_dtor
-@ stub -arch=win32 ??_Gfstream@@UAEPAXI@Z # virtual void * __thiscall fstream::`scalar deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Gfstream@@UAEPAXI@Z(ptr long) iostream_vector_dtor
@ thiscall -arch=win32 ??_Gifstream@@UAEPAXI@Z(ptr long) istream_scalar_dtor
@ thiscall -arch=win32 ??_Gios@@UAEPAXI@Z(ptr long) ios_scalar_dtor
@ thiscall -arch=win32 ??_Giostream@@UAEPAXI@Z(ptr long) iostream_scalar_dtor
diff --git a/dlls/msvcirt/tests/msvcirt.c b/dlls/msvcirt/tests/msvcirt.c
index b87bd422668..7bb8bdcf738 100644
--- a/dlls/msvcirt/tests/msvcirt.c
+++ b/dlls/msvcirt/tests/msvcirt.c
@@ -232,6 +232,7 @@ static int (*__thiscall p_filebuf_sync)(filebuf*);
static int (*__thiscall p_filebuf_overflow)(filebuf*, int);
static int (*__thiscall p_filebuf_underflow)(filebuf*);
static streampos (*__thiscall p_filebuf_seekoff)(filebuf*, streamoff, ios_seek_dir, int);
+static int (*__thiscall p_filebuf_is_open)(filebuf*);
/* strstreambuf */
static strstreambuf* (*__thiscall p_strstreambuf_dynamic_ctor)(strstreambuf*, int);
@@ -436,6 +437,11 @@ static void (*__thiscall p_stdiostream_dtor)(ios*);
static void (*__thiscall p_stdiostream_vbase_dtor)(iostream*);
static iostream* (*__thiscall p_stdiostream_assign)(iostream*, const iostream*);
+/* fstream */
+static iostream* (*__thiscall p_fstream_open_ctor)(iostream*, const char*, ios_open_mode, int, BOOL);
+static void (*__thiscall p_fstream_dtor)(ios*);
+static void (*__thiscall p_fstream_vbase_dtor)(iostream*);
+
/* Iostream_init */
static void* (*__thiscall p_Iostream_init_ios_ctor)(void*, ios*, int);
@@ -574,6 +580,7 @@ static BOOL init(void)
SET(p_filebuf_overflow, "?overflow@filebuf@@UEAAHH@Z");
SET(p_filebuf_underflow, "?underflow@filebuf@@UEAAHXZ");
SET(p_filebuf_seekoff, "?seekoff@filebuf@@UEAAJJW4seek_dir@ios@@H@Z");
+ SET(p_filebuf_is_open, "?is_open@filebuf@@QEBAHXZ");
SET(p_strstreambuf_dynamic_ctor, "??0strstreambuf@@QEAA@H@Z");
SET(p_strstreambuf_funcs_ctor, "??0strstreambuf@@QEAA@P6APEAXJ@ZP6AXPEAX@Z@Z");
@@ -754,6 +761,10 @@ static BOOL init(void)
SET(p_stdiostream_vbase_dtor, "??_Dstdiostream@@QEAAXXZ");
SET(p_stdiostream_assign, "??4stdiostream@@QEAAAEAV0@AEAV0@@Z");
+ SET(p_fstream_open_ctor, "??0fstream@@QEAA@PEBDHH@Z");
+ SET(p_fstream_dtor, "??1fstream@@UEAA@XZ");
+ SET(p_fstream_vbase_dtor, "??_Dfstream@@QEAAXXZ");
+
SET(p_Iostream_init_ios_ctor, "??0Iostream_init@@QEAA@AEAVios@@H@Z");
SET(p_exception_ctor, "??0exception@@QEAA@AEBQEBD@Z");
@@ -804,6 +815,7 @@ static BOOL init(void)
SET(p_filebuf_overflow, "?overflow@filebuf@@UAEHH@Z");
SET(p_filebuf_underflow, "?underflow@filebuf@@UAEHXZ");
SET(p_filebuf_seekoff, "?seekoff@filebuf@@UAEJJW4seek_dir@ios@@H@Z");
+ SET(p_filebuf_is_open, "?is_open@filebuf@@QBEHXZ");
SET(p_strstreambuf_dynamic_ctor, "??0strstreambuf@@QAE@H@Z");
SET(p_strstreambuf_funcs_ctor, "??0strstreambuf@@QAE@P6APAXJ@ZP6AXPAX@Z@Z");
@@ -984,6 +996,10 @@ static BOOL init(void)
SET(p_stdiostream_vbase_dtor, "??_Dstdiostream@@QAEXXZ");
SET(p_stdiostream_assign, "??4stdiostream@@QAEAAV0@AAV0@@Z");
+ SET(p_fstream_open_ctor, "??0fstream@@QAE@PBDHH@Z");
+ SET(p_fstream_dtor, "??1fstream@@UAE@XZ");
+ SET(p_fstream_vbase_dtor, "??_Dfstream@@QAEXXZ");
+
SET(p_Iostream_init_ios_ctor, "??0Iostream_init@@QAE@AAVios@@H@Z");
SET(p_exception_ctor, "??0exception@@QAE@ABQBD@Z");
@@ -7936,6 +7952,63 @@ static void test_std_streams(void)
ok(p_cin->count == 0xabababab, "expected %d got %d\n", 0xabababab, p_cin->count);
}
+static void test_fstream(void)
+{
+ iostream fs, *pfs;
+ filebuf *pfb;
+ ostream *pos;
+ istream *pis;
+ int i;
+ char st[8];
+ const char *filename = "fstream_test";
+
+ /* constructors */
+ pfs = call_func5(p_fstream_open_ctor, &fs, filename, OPENMODE_out, filebuf_openprot, TRUE);
+ ok(pfs == &fs, "constructor returned wrong pointer, expected %p got %p\n", &fs, pfs);
+ ok(fs.base_ios.state == IOSTATE_goodbit, "wrong stream state, expected %d got %d\n", IOSTATE_goodbit, fs.base_ios.state);
+ pfb = (filebuf*) fs.base_ios.sb;
+ ok((int) call_func1(p_filebuf_is_open, pfb) == TRUE, "expected filebuf to be open\n");
+ ok(fs.base_ios.delbuf == 1, "internal filebuf not makred for deletion\n");
+
+ /* integration with ostream */
+ pos = call_func2(p_ostream_print_str, (ostream*) &fs.base2, "ftest ");
+ ok(pos == (ostream*) &fs.base2, "stream operation returned wrong pointer, expected %p got %p\n", &fs, &fs.base2);
+ pos = call_func2(p_ostream_print_int, (ostream*) &fs.base2, 15);
+ ok(pos == (ostream*) &fs.base2, "stream operation returned wrong pointer, expected %p got %p\n", &fs, &fs.base2);
+
+ /* make sure that OPENMODE_in is not implied */
+ ok(_lseek(pfb->fd, 0, SEEK_SET) == 0, "_lseek failed\n");
+ ok(_read(pfb->fd, st, 1) == -1, "_read succeded on OPENMODE_out only fstream\n");
+
+ /* reopen the file for reading */
+ call_func1(p_fstream_vbase_dtor, &fs);
+ pfs = call_func5(p_fstream_open_ctor, &fs, filename, OPENMODE_in, filebuf_openprot, TRUE);
+ ok(pfs == &fs, "constructor returned wrong pointer, expected %p got %p\n", &fs, pfs);
+ ok(fs.base_ios.state == IOSTATE_goodbit, "wrong stream state, expected %d got %d\n", IOSTATE_goodbit, fs.base_ios.state);
+ pfb = (filebuf*) fs.base_ios.sb;
+ ok((int) call_func1(p_filebuf_is_open, pfb) == TRUE, "expected filebuf to be open\n");
+
+ /* integration with istream */
+ memset(st, 'A', sizeof(st));
+ pis = call_func2(p_istream_read_str, (istream*) &fs.base1, st);
+ ok(pis == (istream*) &fs.base1, "stream operation returned wrong pointer, expected %p got %p\n", &fs, &fs.base1);
+ st[7] = 0;
+ ok(!strcmp(st, "ftest"), "expected 'ftest' got '%s'\n", st);
+
+ i = 12345;
+ pis = call_func2(p_istream_read_int, (istream*) &fs.base1, &i);
+ ok(pis == (istream*) &fs.base1, "stream operation returned wrong pointer, expected %p got %p\n", &fs, &fs.base1);
+ ok(i == 15, "expected 12 got %d\n", i);
+
+ /* make sure that OPENMODE_out is not implied */
+ ok(_lseek(pfb->fd, 0, SEEK_SET) == 0, "_lseek failed\n");
+ ok(_write(pfb->fd, "blabla", 6) == -1, "_write succeded on OPENMODE_in fstream\n");
+
+ /* cleanup */
+ call_func1(p_fstream_vbase_dtor, &fs);
+ ok(_unlink(filename) == 0, "Couldn't unlink file named '%s', some filedescs are still open?\n", filename);
+}
+
static void test_exception(void)
{
const char *unknown = "Unknown exception";
@@ -8031,6 +8104,7 @@ START_TEST(msvcirt)
test_stdiostream();
test_Iostream_init();
test_std_streams();
+ test_fstream();
test_exception();
test_mtlock_mtunlock();
diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec
index b791202470f..30526ef818e 100644
--- a/dlls/msvcrt20/msvcrt20.spec
+++ b/dlls/msvcrt20/msvcrt20.spec
@@ -16,8 +16,8 @@
@ stub -arch=win64 ??0fstream@@QEAA@H@Z
@ stub -arch=win32 ??0fstream@@QAE@HPADH@Z
@ stub -arch=win64 ??0fstream@@QEAA@HPEADH@Z
-@ stub -arch=win32 ??0fstream@@QAE@PBDHH@Z
-@ stub -arch=win64 ??0fstream@@QEAA@PEBDHH@Z
+@ thiscall -arch=win32 ??0fstream@@QAE@PBDHH@Z(ptr str long long long) msvcirt.??0fstream@@QAE@PBDHH@Z
+@ cdecl -arch=win64 ??0fstream@@QEAA@PEBDHH@Z(ptr str long long long) msvcirt.??0fstream@@QEAA@PEBDHH@Z
@ stub -arch=win32 ??0fstream@@QAE@XZ
@ stub -arch=win64 ??0fstream@@QEAA@XZ
@ thiscall -arch=win32 ??0ifstream@@QAE@ABV0@@Z(ptr ptr long) msvcirt.??0ifstream@@QAE@ABV0@@Z
@@ -122,8 +122,8 @@
@ cdecl -arch=win64 ??1Iostream_init@@QEAA@XZ(ptr) msvcirt.??1Iostream_init@@QEAA@XZ
@ thiscall -arch=win32 ??1filebuf@@UAE@XZ(ptr) msvcirt.??1filebuf@@UAE@XZ
@ cdecl -arch=win64 ??1filebuf@@UEAA@XZ(ptr) msvcirt.??1filebuf@@UEAA@XZ
-@ stub -arch=win32 ??1fstream@@UAE@XZ
-@ stub -arch=win64 ??1fstream@@UEAA@XZ
+@ thiscall -arch=win32 ??1fstream@@UAE@XZ(ptr) msvcirt.??1fstream@@UAE@XZ
+@ cdecl -arch=win64 ??1fstream@@UEAA@XZ(ptr) msvcirt.??1fstream@@UEAA@XZ
@ thiscall -arch=win32 ??1ifstream@@UAE@XZ(ptr) msvcirt.??1ifstream@@UAE@XZ
@ cdecl -arch=win64 ??1ifstream@@UEAA@XZ(ptr) msvcirt.??1ifstream@@UEAA@XZ
@ thiscall -arch=win32 ??1ios@@UAE@XZ(ptr) msvcirt.??1ios@@UAE@XZ
@@ -287,7 +287,7 @@
@ thiscall -arch=win32 ??Bios@@QBEPAXXZ(ptr) msvcirt.??Bios@@QBEPAXXZ
@ cdecl -arch=win64 ??Bios@@QEBAPEAXXZ(ptr) msvcirt.??Bios@@QEBAPEAXXZ
@ extern ??_7filebuf@@6B@ msvcirt.??_7filebuf@@6B@
-# @ extern ??_7fstream@@6B@
+@ extern ??_7fstream@@6B@ msvcirt.??_7fstream@@6B@
@ extern ??_7ifstream@@6B@ msvcirt.??_7ifstream@@6B@
@ extern ??_7ios@@6B@ msvcirt.??_7ios@@6B@
@ extern ??_7iostream@@6B@ msvcirt.??_7iostream@@6B@
@@ -303,8 +303,8 @@
@ extern ??_7streambuf@@6B@ msvcirt.??_7streambuf@@6B@
@ extern ??_7strstream@@6B@ msvcirt.??_7strstream@@6B@
@ extern ??_7strstreambuf@@6B@ msvcirt.??_7strstreambuf@@6B@
-# @ extern ??_8fstream@@7Bistream@@@
-# @ extern ??_8fstream@@7Bostream@@@
+@ extern ??_8fstream@@7Bistream@@@ msvcirt.??_8fstream@@7Bistream@@@
+@ extern ??_8fstream@@7Bostream@@@ msvcirt.??_8fstream@@7Bostream@@@
@ extern ??_8ifstream@@7B@ msvcirt.??_8ifstream@@7B@
@ extern ??_8iostream@@7Bistream@@@ msvcirt.??_8iostream@@7Bistream@@@
@ extern ??_8iostream@@7Bostream@@@ msvcirt.??_8iostream@@7Bostream@@@
@@ -319,8 +319,8 @@
@ extern ??_8stdiostream@@7Bostream@@@ msvcirt.??_8stdiostream@@7Bostream@@@
@ extern ??_8strstream@@7Bistream@@@ msvcirt.??_8strstream@@7Bistream@@@
@ extern ??_8strstream@@7Bostream@@@ msvcirt.??_8strstream@@7Bostream@@@
-@ stub -arch=win32 ??_Dfstream@@QAEXXZ
-@ stub -arch=win64 ??_Dfstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dfstream@@QAEXXZ(ptr) msvcirt.??_Dfstream@@QAEXXZ
+@ cdecl -arch=win64 ??_Dfstream@@QEAAXXZ(ptr) msvcirt.??_Dfstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Difstream@@QAEXXZ(ptr) msvcirt.??_Difstream@@QAEXXZ
@ cdecl -arch=win64 ??_Difstream@@QEAAXXZ(ptr) msvcirt.??_Difstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Diostream@@QAEXXZ(ptr) msvcirt.??_Diostream@@QAEXXZ
@@ -331,8 +331,8 @@
@ cdecl -arch=win64 ??_Distream_withassign@@QEAAXXZ(ptr) msvcirt.??_Distream_withassign@@QEAAXXZ
@ thiscall -arch=win32 ??_Distrstream@@QAEXXZ(ptr) msvcirt.??_Distrstream@@QAEXXZ
@ cdecl -arch=win64 ??_Distrstream@@QEAAXXZ(ptr) msvcirt.??_Distrstream@@QEAAXXZ
-@ stub -arch=win32 ??_Dofstream@@QAEXXZ
-@ stub -arch=win64 ??_Dofstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dofstream@@QAEXXZ(ptr) msvcirt.??_Dofstream@@QAEXXZ
+@ cdecl -arch=win64 ??_Dofstream@@QEAAXXZ(ptr) msvcirt.??_Dofstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Dostream@@QAEXXZ(ptr) msvcirt.??_Dostream@@QAEXXZ
@ cdecl -arch=win64 ??_Dostream@@QEAAXXZ(ptr) msvcirt.??_Dostream@@QEAAXXZ
@ thiscall -arch=win32 ??_Dostream_withassign@@QAEXXZ(ptr) msvcirt.??_Dostream_withassign@@QAEXXZ
@@ -345,7 +345,7 @@
@ cdecl -arch=win64 ??_Dstrstream@@QEAAXXZ(ptr) msvcirt.??_Dstrstream@@QEAAXXZ
@ stub -arch=win32 ??_EIostream_init@@QAEPAXI@Z
@ thiscall -arch=win32 ??_Efilebuf@@UAEPAXI@Z(ptr long) msvcirt.??_Efilebuf@@UAEPAXI@Z
-@ stub -arch=win32 ??_Efstream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Efstream@@UAEPAXI@Z(ptr long) msvcirt.??_Efstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eifstream@@UAEPAXI@Z(ptr long) msvcirt.??_Eifstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eios@@UAEPAXI@Z(ptr long) msvcirt.??_Eios@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eiostream@@UAEPAXI@Z(ptr long) msvcirt.??_Eiostream@@UAEPAXI@Z
@@ -363,7 +363,7 @@
@ thiscall -arch=win32 ??_Estrstreambuf@@UAEPAXI@Z(ptr long) msvcirt.??_Estrstreambuf@@UAEPAXI@Z
@ stub -arch=win32 ??_GIostream_init@@QAEPAXI@Z
@ thiscall -arch=win32 ??_Gfilebuf@@UAEPAXI@Z(ptr long) msvcirt.??_Gfilebuf@@UAEPAXI@Z
-@ stub -arch=win32 ??_Gfstream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Gfstream@@UAEPAXI@Z(ptr long) msvcirt.??_Gfstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Gifstream@@UAEPAXI@Z(ptr long) msvcirt.??_Gifstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Gios@@UAEPAXI@Z(ptr long) msvcirt.??_Gios@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Giostream@@UAEPAXI@Z(ptr long) msvcirt.??_Giostream@@UAEPAXI@Z
diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec
index 3f4f2f90e1d..d2cf3f86c5f 100644
--- a/dlls/msvcrt40/msvcrt40.spec
+++ b/dlls/msvcrt40/msvcrt40.spec
@@ -34,8 +34,8 @@
@ stub -arch=win64 ??0fstream@@QEAA@H@Z
@ stub -arch=win32 ??0fstream@@QAE@HPADH@Z
@ stub -arch=win64 ??0fstream@@QEAA@HPEADH@Z
-@ stub -arch=win32 ??0fstream@@QAE@PBDHH@Z
-@ stub -arch=win64 ??0fstream@@QEAA@PEBDHH@Z
+@ thiscall -arch=win32 ??0fstream@@QAE@PBDHH@Z(ptr str long long long) msvcirt.??0fstream@@QAE@PBDHH@Z
+@ cdecl -arch=win64 ??0fstream@@QEAA@PEBDHH@Z(ptr str long long long) msvcirt.??0fstream@@QEAA@PEBDHH@Z
@ stub -arch=win32 ??0fstream@@QAE@XZ
@ stub -arch=win64 ??0fstream@@QEAA@XZ
@ thiscall -arch=win32 ??0ifstream@@QAE@ABV0@@Z(ptr ptr long) msvcirt.??0ifstream@@QAE@ABV0@@Z
@@ -339,7 +339,7 @@
@ extern ??_7bad_typeid@@6B@ msvcrt.??_7bad_typeid@@6B@
@ extern ??_7exception@@6B@ msvcrt.??_7exception@@6B@
@ extern ??_7filebuf@@6B@ msvcirt.??_7filebuf@@6B@
-# @ extern ??_7fstream@@6B@
+@ extern ??_7fstream@@6B@ msvcirt.??_7fstream@@6B@
@ extern ??_7ifstream@@6B@ msvcirt.??_7ifstream@@6B@
@ extern ??_7ios@@6B@ msvcirt.??_7ios@@6B@
@ extern ??_7iostream@@6B@ msvcirt.??_7iostream@@6B@
@@ -356,8 +356,8 @@
@ extern ??_7streambuf@@6B@ msvcirt.??_7streambuf@@6B@
@ extern ??_7strstream@@6B@ msvcirt.??_7strstream@@6B@
@ extern ??_7strstreambuf@@6B@ msvcirt.??_7strstreambuf@@6B@
-# @ extern ??_8fstream@@7Bistream@@@
-# @ extern ??_8fstream@@7Bostream@@@
+@ extern ??_8fstream@@7Bistream@@@ msvcirt.??_8fstream@@7Bistream@@@
+@ extern ??_8fstream@@7Bostream@@@ msvcirt.??_8fstream@@7Bostream@@@
@ extern ??_8ifstream@@7B@ msvcirt.??_8ifstream@@7B@
@ extern ??_8iostream@@7Bistream@@@ msvcirt.??_8iostream@@7Bistream@@@
@ extern ??_8iostream@@7Bostream@@@ msvcirt.??_8iostream@@7Bostream@@@
@@ -372,8 +372,8 @@
@ extern ??_8stdiostream@@7Bostream@@@ msvcirt.??_8stdiostream@@7Bostream@@@
@ extern ??_8strstream@@7Bistream@@@ msvcirt.??_8strstream@@7Bistream@@@
@ extern ??_8strstream@@7Bostream@@@ msvcirt.??_8strstream@@7Bostream@@@
-@ stub -arch=win32 ??_Dfstream@@QAEXXZ
-@ stub -arch=win64 ??_Dfstream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dfstream@@QAEXXZ(ptr) msvcirt.??_Dfstream@@QAEXXZ
+@ cdecl -arch=win64 ??_Dfstream@@QEAAXXZ(ptr) msvcirt.??_Dfstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Difstream@@QAEXXZ(ptr) msvcirt.??_Difstream@@QAEXXZ
@ cdecl -arch=win64 ??_Difstream@@QEAAXXZ(ptr) msvcirt.??_Difstream@@QEAAXXZ
@ thiscall -arch=win32 ??_Diostream@@QAEXXZ(ptr) msvcirt.??_Diostream@@QAEXXZ
@@ -402,7 +402,7 @@
@ thiscall -arch=win32 ??_Ebad_typeid@@UAEPAXI@Z(ptr long) msvcrt.??_Ebad_typeid@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eexception@@UAEPAXI@Z(ptr long) msvcrt.??_Eexception@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Efilebuf@@UAEPAXI@Z(ptr long) msvcirt.??_Efilebuf@@UAEPAXI@Z
-@ stub -arch=win32 ??_Efstream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Efstream@@UAEPAXI@Z(ptr long) msvcirt.??_Efstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eifstream@@UAEPAXI@Z(ptr long) msvcirt.??_Eifstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eios@@UAEPAXI@Z(ptr long) msvcirt.??_Eios@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Eiostream@@UAEPAXI@Z(ptr long) msvcirt.??_Eiostream@@UAEPAXI@Z
@@ -425,7 +425,7 @@
@ thiscall -arch=win32 ??_Gbad_typeid@@UAEPAXI@Z(ptr long) msvcrt.??_Gbad_typeid@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Gexception@@UAEPAXI@Z(ptr long) msvcrt.??_Gexception@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Gfilebuf@@UAEPAXI@Z(ptr long) msvcirt.??_Gfilebuf@@UAEPAXI@Z
-@ stub -arch=win32 ??_Gfstream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Gfstream@@UAEPAXI@Z(ptr long) msvcirt.??_Gfstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Gifstream@@UAEPAXI@Z(ptr long) msvcirt.??_Gifstream@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Gios@@UAEPAXI@Z(ptr long) msvcirt.??_Gios@@UAEPAXI@Z
@ thiscall -arch=win32 ??_Giostream@@UAEPAXI@Z(ptr long) msvcirt.??_Giostream@@UAEPAXI@Z
--
2.28.0