From 849163b1ed5e2586ee9f391e7a8b03f054bb620f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Iv=C3=A1n=20Matellanes?= <matellanesivan@gmail.com>
Date: Tue, 14 Jun 2016 15:40:15 +0100
Subject: [PATCH] msvcirt: Add stub for class ostream.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Iván Matellanes <matellanes.ivan@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
---
 dlls/msvcirt/msvcirt.c      | 254 ++++++++++++++++++++++++++++++++----
 dlls/msvcirt/msvcirt.spec   | 100 +++++++-------
 dlls/msvcrt20/msvcrt20.spec |  92 ++++++-------
 dlls/msvcrt40/msvcrt40.spec |  92 ++++++-------
 4 files changed, 374 insertions(+), 164 deletions(-)

diff --git a/dlls/msvcirt/msvcirt.c b/dlls/msvcirt/msvcirt.c
index 19c26fd67e1..784b84a2024 100644
--- a/dlls/msvcirt/msvcirt.c
+++ b/dlls/msvcirt/msvcirt.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2007 Alexandre Julliard
- * Copyright (C) 2015 Iván Matellanes
+ * Copyright (C) 2015-2016 Iván Matellanes
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -150,7 +150,8 @@ void __cdecl ios_unlockc(void);
 
 /* class ostream */
 typedef struct _ostream {
-    const vtable_ptr *vtable;
+    const int *vbtable;
+    int unknown;
 } ostream;
 
 /* ??_7streambuf@@6B@ */
@@ -163,6 +164,8 @@ extern const vtable_ptr MSVCP_strstreambuf_vtable;
 extern const vtable_ptr MSVCP_stdiobuf_vtable;
 /* ??_7ios@@6B@ */
 extern const vtable_ptr MSVCP_ios_vtable;
+/* ??_7ostream@@6B@ */
+extern const vtable_ptr MSVCP_ostream_vtable;
 
 #ifndef __GNUC__
 void __asm_dummy_vtables(void) {
@@ -217,15 +220,24 @@ void __asm_dummy_vtables(void) {
             VTABLE_ADD_FUNC(streambuf_doallocate));
     __ASM_VTABLE(ios,
             VTABLE_ADD_FUNC(ios_vector_dtor));
+    __ASM_VTABLE(ostream,
+            VTABLE_ADD_FUNC(ostream_vector_dtor));
 #ifndef __GNUC__
 }
 #endif
 
+#define ALIGNED_SIZE(size, alignment) (((size)+((alignment)-1))/(alignment)*(alignment))
+#define VBTABLE_ENTRY(class, offset, vbase) ALIGNED_SIZE(sizeof(class), TYPE_ALIGNMENT(vbase))-offset
+
+/* ??_8ostream@@7B@ */
+const int ostream_vbtable[] = {0, VBTABLE_ENTRY(ostream, FIELD_OFFSET(ostream, vbtable), ios)};
+
 DEFINE_RTTI_DATA0(streambuf, 0, ".?AVstreambuf@@")
 DEFINE_RTTI_DATA1(filebuf, 0, &streambuf_rtti_base_descriptor, ".?AVfilebuf@@")
 DEFINE_RTTI_DATA1(strstreambuf, 0, &streambuf_rtti_base_descriptor, ".?AVstrstreambuf@@")
 DEFINE_RTTI_DATA1(stdiobuf, 0, &streambuf_rtti_base_descriptor, ".?AVstdiobuf@@")
 DEFINE_RTTI_DATA0(ios, 0, ".?AVios@@")
+DEFINE_RTTI_DATA1(ostream, sizeof(ostream), &ios_rtti_base_descriptor, ".?AVostream@@")
 
 /* ??0streambuf@@IAE@PADH@Z */
 /* ??0streambuf@@IEAA@PEADH@Z */
@@ -2217,6 +2229,223 @@ int __cdecl ios_xalloc(void)
     return ret;
 }
 
+/* ??0ostream@@QAE@PAVstreambuf@@@Z */
+/* ??0ostream@@QEAA@PEAVstreambuf@@@Z */
+DEFINE_THISCALL_WRAPPER(ostream_sb_ctor, 12)
+ostream* __thiscall ostream_sb_ctor(ostream *this, streambuf *sb, BOOL virt_init)
+{
+    FIXME("(%p %p %d) stub\n", this, sb, virt_init);
+    return this;
+}
+
+/* ??0ostream@@IAE@ABV0@@Z */
+/* ??0ostream@@IEAA@AEBV0@@Z */
+DEFINE_THISCALL_WRAPPER(ostream_copy_ctor, 12)
+ostream* __thiscall ostream_copy_ctor(ostream *this, const ostream *copy, BOOL virt_init)
+{
+    FIXME("(%p %p %d) stub\n", this, copy, virt_init);
+    return this;
+}
+
+/* ??0ostream@@IAE@XZ */
+/* ??0ostream@@IEAA@XZ */
+DEFINE_THISCALL_WRAPPER(ostream_ctor, 8)
+ostream* __thiscall ostream_ctor(ostream *this, BOOL virt_init)
+{
+    FIXME("(%p %d) stub\n", this, virt_init);
+    return this;
+}
+
+/* ??1ostream@@UAE@XZ */
+/* ??1ostream@@UEAA@XZ */
+DEFINE_THISCALL_WRAPPER(ostream_dtor, 4)
+void __thiscall ostream_dtor(ios *base)
+{
+    FIXME("(%p) stub\n", base);
+}
+
+/* ??4ostream@@IAEAAV0@PAVstreambuf@@@Z */
+/* ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z */
+DEFINE_THISCALL_WRAPPER(ostream_assign_sb, 8)
+ostream* __thiscall ostream_assign_sb(ostream *this, streambuf *sb)
+{
+    FIXME("(%p %p) stub\n", this, sb);
+    return this;
+}
+
+/* ??4ostream@@IAEAAV0@ABV0@@Z */
+/* ??4ostream@@IEAAAEAV0@AEBV0@@Z */
+DEFINE_THISCALL_WRAPPER(ostream_assign, 8)
+ostream* __thiscall ostream_assign(ostream *this, const ostream *rhs)
+{
+    FIXME("(%p %p) stub\n", this, rhs);
+    return this;
+}
+
+/* ??_Dostream@@QAEXXZ */
+/* ??_Dostream@@QEAAXXZ */
+DEFINE_THISCALL_WRAPPER(ostream_vbase_dtor, 4)
+void __thiscall ostream_vbase_dtor(ostream *this)
+{
+    FIXME("(%p) stub\n", this);
+}
+
+/* ??_Eostream@@UAEPAXI@Z */
+DEFINE_THISCALL_WRAPPER(ostream_vector_dtor, 8)
+ostream* __thiscall ostream_vector_dtor(ios *base, unsigned int flags)
+{
+    FIXME("(%p %x) stub\n", base, flags);
+    return NULL;
+}
+
+/* ??_Gostream@@UAEPAXI@Z */
+DEFINE_THISCALL_WRAPPER(ostream_scalar_dtor, 8)
+ostream* __thiscall ostream_scalar_dtor(ios *base, unsigned int flags)
+{
+    FIXME("(%p %x) stub\n", base, flags);
+    return NULL;
+}
+
+/* ?flush@ostream@@QAEAAV1@XZ */
+/* ?flush@ostream@@QEAAAEAV1@XZ */
+DEFINE_THISCALL_WRAPPER(ostream_flush, 4)
+ostream* __thiscall ostream_flush(ostream *this)
+{
+    FIXME("(%p) stub\n", this);
+    return this;
+}
+
+/* ?opfx@ostream@@QAEHXZ */
+/* ?opfx@ostream@@QEAAHXZ */
+DEFINE_THISCALL_WRAPPER(ostream_opfx, 4)
+int __thiscall ostream_opfx(ostream *this)
+{
+    FIXME("(%p) stub\n", this);
+    return 0;
+}
+
+/* ?osfx@ostream@@QAEXXZ */
+/* ?osfx@ostream@@QEAAXXZ */
+DEFINE_THISCALL_WRAPPER(ostream_osfx, 4)
+void __thiscall ostream_osfx(ostream *this)
+{
+    FIXME("(%p) stub\n", this);
+}
+
+/* ?put@ostream@@QAEAAV1@D@Z */
+/* ?put@ostream@@QEAAAEAV1@D@Z */
+DEFINE_THISCALL_WRAPPER(ostream_put_char, 8)
+ostream* __thiscall ostream_put_char(ostream *this, char c)
+{
+    FIXME("(%p %c) stub\n", this, c);
+    return this;
+}
+
+/* ?put@ostream@@QAEAAV1@C@Z */
+/* ?put@ostream@@QEAAAEAV1@C@Z */
+DEFINE_THISCALL_WRAPPER(ostream_put_signed_char, 8)
+ostream* __thiscall ostream_put_signed_char(ostream *this, signed char c)
+{
+    FIXME("(%p %c) stub\n", this, c);
+    return this;
+}
+
+/* ?put@ostream@@QAEAAV1@E@Z */
+/* ?put@ostream@@QEAAAEAV1@E@Z */
+DEFINE_THISCALL_WRAPPER(ostream_put_unsigned_char, 8)
+ostream* __thiscall ostream_put_unsigned_char(ostream *this, unsigned char c)
+{
+    FIXME("(%p %c) stub\n", this, c);
+    return this;
+}
+
+/* ?seekp@ostream@@QAEAAV1@J@Z */
+/* ?seekp@ostream@@QEAAAEAV1@J@Z */
+DEFINE_THISCALL_WRAPPER(ostream_seekp, 8)
+ostream* __thiscall ostream_seekp(ostream *this, streampos pos)
+{
+    FIXME("(%p %d) stub\n", this, pos);
+    return this;
+}
+
+/* ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z */
+/* ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z */
+DEFINE_THISCALL_WRAPPER(ostream_seekp_offset, 12)
+ostream* __thiscall ostream_seekp_offset(ostream *this, streamoff off, ios_seek_dir dir)
+{
+    FIXME("(%p %d %d) stub\n", this, off, dir);
+    return this;
+}
+
+/* ?tellp@ostream@@QAEJXZ */
+/* ?tellp@ostream@@QEAAJXZ */
+DEFINE_THISCALL_WRAPPER(ostream_tellp, 4)
+streampos __thiscall ostream_tellp(ostream *this)
+{
+    FIXME("(%p) stub\n", this);
+    return 0;
+}
+
+/* ?write@ostream@@QAEAAV1@PBDH@Z */
+/* ?write@ostream@@QEAAAEAV1@PEBDH@Z */
+DEFINE_THISCALL_WRAPPER(ostream_write_char, 12)
+ostream* __thiscall ostream_write_char(ostream *this, const char *str, int count)
+{
+    FIXME("(%p %s %d) stub\n", this, str, count);
+    return this;
+}
+
+/* ?write@ostream@@QAEAAV1@PBCH@Z */
+/* ?write@ostream@@QEAAAEAV1@PEBCH@Z */
+DEFINE_THISCALL_WRAPPER(ostream_write_signed_char, 12)
+ostream* __thiscall ostream_write_signed_char(ostream *this, const signed char *str, int count)
+{
+    FIXME("(%p %s %d) stub\n", this, str, count);
+    return this;
+}
+
+/* ?write@ostream@@QAEAAV1@PBEH@Z */
+/* ?write@ostream@@QEAAAEAV1@PEBEH@Z */
+DEFINE_THISCALL_WRAPPER(ostream_write_unsigned_char, 12)
+ostream* __thiscall ostream_write_unsigned_char(ostream *this, const unsigned char *str, int count)
+{
+    FIXME("(%p %s %d) stub\n", this, str, count);
+    return this;
+}
+
+/* ?writepad@ostream@@AAEAAV1@PBD0@Z */
+/* ?writepad@ostream@@AEAAAEAV1@PEBD0@Z */
+DEFINE_THISCALL_WRAPPER(ostream_writepad, 12)
+ostream* __thiscall ostream_writepad(ostream *this, const char *str1, const char *str2)
+{
+    FIXME("(%p %s %s) stub\n", this, str1, str2);
+    return this;
+}
+
+/* ?endl@@YAAAVostream@@AAV1@@Z */
+/* ?endl@@YAAEAVostream@@AEAV1@@Z */
+ostream* __cdecl ostream_endl(ostream *this)
+{
+   FIXME("(%p) stub\n", this);
+   return this;
+}
+
+/* ?ends@@YAAAVostream@@AAV1@@Z */
+/* ?ends@@YAAEAVostream@@AEAV1@@Z */
+ostream* __cdecl ostream_ends(ostream *this)
+{
+   FIXME("(%p) stub\n", this);
+   return this;
+}
+
+/* ?flush@@YAAAVostream@@AAV1@@Z */
+/* ?flush@@YAAEAVostream@@AEAV1@@Z */
+ostream* __cdecl ostream_flush_manip(ostream *this)
+{
+   FIXME("(%p) stub\n", this);
+   return this;
+}
+
 /******************************************************************
  *		 ??0ostrstream@@QAE@XZ (MSVCRTI.@)
  */
@@ -2280,26 +2509,6 @@ void * __thiscall MSVCIRT_operator_sl_callback(ostream * _this, ostream * (__cde
    return func(_this);
 }
 
-/******************************************************************
- *		?endl@@YAAAVostream@@AAV1@@Z (MSVCRTI.@)
- *           class ostream & __cdecl endl(class ostream &)
- */
-void * CDECL MSVCIRT_endl(ostream * _this)
-{
-   FIXME("(%p)->() stub\n", _this);
-   return _this;
-}
-
-/******************************************************************
- *		?ends@@YAAAVostream@@AAV1@@Z (MSVCRTI.@)
- *           class ostream & __cdecl ends(class ostream &)
- */
-void * CDECL MSVCIRT_ends(ostream * _this)
-{
-   FIXME("(%p)->() stub\n", _this);
-   return _this;
-}
-
 #ifdef __i386__
 
 #define DEFINE_VTBL_WRAPPER(off)            \
@@ -2355,6 +2564,7 @@ static void init_io(void *base)
     init_strstreambuf_rtti(base);
     init_stdiobuf_rtti(base);
     init_ios_rtti(base);
+    init_ostream_rtti(base);
 #endif
 }
 
diff --git a/dlls/msvcirt/msvcirt.spec b/dlls/msvcirt/msvcirt.spec
index 032667296e3..ef8b4aa3477 100644
--- a/dlls/msvcirt/msvcirt.spec
+++ b/dlls/msvcirt/msvcirt.spec
@@ -80,12 +80,12 @@
 @ stub -arch=win64 ??0ofstream@@QEAA@PEBDHH@Z
 @ stub -arch=win32 ??0ofstream@@QAE@XZ  # __thiscall ofstream::ofstream(void)
 @ stub -arch=win64 ??0ofstream@@QEAA@XZ
-@ stub -arch=win32 ??0ostream@@IAE@ABV0@@Z  # __thiscall ostream::ostream(class ostream const &)
-@ stub -arch=win64 ??0ostream@@IEAA@AEBV0@@Z
-@ stub -arch=win32 ??0ostream@@IAE@XZ  # __thiscall ostream::ostream(void)
-@ stub -arch=win64 ??0ostream@@IEAA@XZ
-@ stub -arch=win32 ??0ostream@@QAE@PAVstreambuf@@@Z  # __thiscall ostream::ostream(class streambuf *)
-@ stub -arch=win64 ??0ostream@@QEAA@PEAVstreambuf@@@Z
+@ thiscall -arch=win32 ??0ostream@@IAE@ABV0@@Z(ptr ptr long) ostream_copy_ctor
+@ cdecl -arch=win64 ??0ostream@@IEAA@AEBV0@@Z(ptr ptr long) ostream_copy_ctor
+@ thiscall -arch=win32 ??0ostream@@IAE@XZ(ptr long) ostream_ctor
+@ cdecl -arch=win64 ??0ostream@@IEAA@XZ(ptr long) ostream_ctor
+@ thiscall -arch=win32 ??0ostream@@QAE@PAVstreambuf@@@Z(ptr ptr long) ostream_sb_ctor
+@ cdecl -arch=win64 ??0ostream@@QEAA@PEAVstreambuf@@@Z(ptr ptr long) ostream_sb_ctor
 @ stub -arch=win32 ??0ostream_withassign@@QAE@ABV0@@Z  # __thiscall ostream_withassign::ostream_withassign(class ostream_withassign const &)
 @ stub -arch=win64 ??0ostream_withassign@@QEAA@AEBV0@@Z
 @ stub -arch=win32 ??0ostream_withassign@@QAE@PAVstreambuf@@@Z  # __thiscall ostream_withassign::ostream_withassign(class streambuf *)
@@ -154,8 +154,8 @@
 @ cdecl -arch=win64 ??1logic_error@@UEAA@XZ(ptr) MSVCP_logic_error_dtor
 @ stub -arch=win32 ??1ofstream@@UAE@XZ  # virtual __thiscall ofstream::~ofstream(void)
 @ stub -arch=win64 ??1ofstream@@UEAA@XZ
-@ stub -arch=win32 ??1ostream@@UAE@XZ  # virtual __thiscall ostream::~ostream(void)
-@ stub -arch=win64 ??1ostream@@UEAA@XZ
+@ thiscall -arch=win32 ??1ostream@@UAE@XZ(ptr) ostream_dtor
+@ cdecl -arch=win64 ??1ostream@@UEAA@XZ(ptr) ostream_dtor
 @ stub -arch=win32 ??1ostream_withassign@@UAE@XZ  # virtual __thiscall ostream_withassign::~ostream_withassign(void)
 @ stub -arch=win64 ??1ostream_withassign@@UEAA@XZ
 @ thiscall -arch=win32 ??1ostrstream@@UAE@XZ(ptr) MSVCIRT_ostrstream_dtor
@@ -202,10 +202,10 @@
 @ cdecl -arch=win64 ??4logic_error@@QEAAAEAV0@AEBV0@@Z(ptr ptr) MSVCP_logic_error_assign
 @ stub -arch=win32 ??4ofstream@@QAEAAV0@ABV0@@Z  # class ofstream & __thiscall ofstream::operator=(class ofstream const &)
 @ stub -arch=win64 ??4ofstream@@QEAAAEAV0@AEBV0@@Z
-@ stub -arch=win32 ??4ostream@@IAEAAV0@ABV0@@Z  # class ostream & __thiscall ostream::operator=(class ostream const &)
-@ stub -arch=win64 ??4ostream@@IEAAAEAV0@AEBV0@@Z
-@ stub -arch=win32 ??4ostream@@IAEAAV0@PAVstreambuf@@@Z  # class ostream & __thiscall ostream::operator=(class streambuf *)
-@ stub -arch=win64 ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z
+@ thiscall -arch=win32 ??4ostream@@IAEAAV0@ABV0@@Z(ptr ptr) ostream_assign
+@ cdecl -arch=win64 ??4ostream@@IEAAAEAV0@AEBV0@@Z(ptr ptr) ostream_assign
+@ thiscall -arch=win32 ??4ostream@@IAEAAV0@PAVstreambuf@@@Z(ptr ptr) ostream_assign_sb
+@ cdecl -arch=win64 ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z(ptr ptr) ostream_assign_sb
 @ stub -arch=win32 ??4ostream_withassign@@QAEAAV0@ABV0@@Z  # class ostream_withassign & __thiscall ostream_withassign::operator=(class ostream_withassign const &)
 @ stub -arch=win64 ??4ostream_withassign@@QEAAAEAV0@AEBV0@@Z
 @ stub -arch=win32 ??4ostream_withassign@@QAEAAVostream@@ABV1@@Z  # class ostream & __thiscall ostream_withassign::operator=(class ostream const &)
@@ -313,7 +313,7 @@
 # @ extern ??_7istrstream@@6B@  # const istrstream::`vftable'
 @ extern ??_7logic_error@@6B@ MSVCP_logic_error_vtable
 # @ extern ??_7ofstream@@6B@  # const ofstream::`vftable'
-# @ extern ??_7ostream@@6B@  # const ostream::`vftable'
+@ extern ??_7ostream@@6B@ MSVCP_ostream_vtable
 # @ extern ??_7ostream_withassign@@6B@  # const ostream_withassign::`vftable'
 # @ extern ??_7ostrstream@@6B@  # const ostrstream::`vftable'
 @ extern ??_7stdiobuf@@6B@ MSVCP_stdiobuf_vtable
@@ -330,7 +330,7 @@
 # @ extern ??_8istream_withassign@@7B@  # const istream_withassign::`vbtable'
 # @ extern ??_8istrstream@@7B@  # const istrstream::`vbtable'
 # @ extern ??_8ofstream@@7B@  # const ofstream::`vbtable'
-# @ extern ??_8ostream@@7B@  # const ostream::`vbtable'
+@ extern ??_8ostream@@7B@ ostream_vbtable
 # @ extern ??_8ostream_withassign@@7B@  # const ostream_withassign::`vbtable'
 # @ extern ??_8ostrstream@@7B@  # const ostrstream::`vbtable'
 # @ extern ??_8stdiostream@@7Bistream@@@  # const stdiostream::`vbtable'{for `istream'}
@@ -351,8 +351,8 @@
 @ stub -arch=win64 ??_Distrstream@@QEAAXXZ
 @ stub -arch=win32 ??_Dofstream@@QAEXXZ  # void __thiscall ofstream::`vbase destructor'(void)
 @ stub -arch=win64 ??_Dofstream@@QEAAXXZ
-@ stub -arch=win32 ??_Dostream@@QAEXXZ  # void __thiscall ostream::`vbase destructor'(void)
-@ stub -arch=win64 ??_Dostream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dostream@@QAEXXZ(ptr) ostream_vbase_dtor
+@ cdecl -arch=win64 ??_Dostream@@QEAAXXZ(ptr) ostream_vbase_dtor
 @ stub -arch=win32 ??_Dostream_withassign@@QAEXXZ  # void __thiscall ostream_withassign::`vbase destructor'(void)
 @ stub -arch=win64 ??_Dostream_withassign@@QEAAXXZ
 @ stub -arch=win32 ??_Dostrstream@@QAEXXZ  # void __thiscall ostrstream::`vbase destructor'(void)
@@ -372,7 +372,7 @@
 @ stub -arch=win32 ??_Eistrstream@@UAEPAXI@Z  # virtual void * __thiscall istrstream::`vector deleting destructor'(unsigned int)
 @ thiscall -arch=win32 ??_Elogic_error@@UAEPAXI@Z(ptr long) MSVCP_logic_error_vector_dtor
 @ stub -arch=win32 ??_Eofstream@@UAEPAXI@Z  # virtual void * __thiscall ofstream::`vector deleting destructor'(unsigned int)
-@ stub -arch=win32 ??_Eostream@@UAEPAXI@Z  # virtual void * __thiscall ostream::`vector deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Eostream@@UAEPAXI@Z(ptr long) ostream_vector_dtor
 @ stub -arch=win32 ??_Eostream_withassign@@UAEPAXI@Z  # virtual void * __thiscall ostream_withassign::`vector deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Eostrstream@@UAEPAXI@Z  # virtual void * __thiscall ostrstream::`vector deleting destructor'(unsigned int)
 @ thiscall -arch=win32 ??_Estdiobuf@@UAEPAXI@Z(ptr long) stdiobuf_vector_dtor
@@ -391,7 +391,7 @@
 @ stub -arch=win32 ??_Gistrstream@@UAEPAXI@Z  # virtual void * __thiscall istrstream::`scalar deleting destructor'(unsigned int)
 @ thiscall -arch=win32 ??_Glogic_error@@UAEPAXI@Z(ptr long) MSVCP_logic_error_scalar_dtor
 @ stub -arch=win32 ??_Gofstream@@UAEPAXI@Z  # virtual void * __thiscall ofstream::`scalar deleting destructor'(unsigned int)
-@ stub -arch=win32 ??_Gostream@@UAEPAXI@Z  # virtual void * __thiscall ostream::`scalar deleting destructor'(unsigned int)
+@ thiscall -arch=win32 ??_Gostream@@UAEPAXI@Z(ptr long) ostream_scalar_dtor
 @ stub -arch=win32 ??_Gostream_withassign@@UAEPAXI@Z  # virtual void * __thiscall ostream_withassign::`scalar deleting destructor'(unsigned int)
 @ stub -arch=win32 ??_Gostrstream@@UAEPAXI@Z  # virtual void * __thiscall ostrstream::`scalar deleting destructor'(unsigned int)
 @ thiscall -arch=win32 ??_Gstdiobuf@@UAEPAXI@Z(ptr long) stdiobuf_scalar_dtor
@@ -457,10 +457,10 @@
 @ cdecl -arch=win64 ?ebuf@streambuf@@IEBAPEADXZ(ptr) streambuf_ebuf
 @ thiscall -arch=win32 ?egptr@streambuf@@IBEPADXZ(ptr) streambuf_egptr
 @ cdecl -arch=win64 ?egptr@streambuf@@IEBAPEADXZ(ptr) streambuf_egptr
-@ cdecl -arch=win32 ?endl@@YAAAVostream@@AAV1@@Z(ptr) MSVCIRT_endl  # class ostream & __cdecl endl(class ostream &)
-@ cdecl -arch=win64 ?endl@@YAAEAVostream@@AEAV1@@Z(ptr) MSVCIRT_endl
-@ cdecl -arch=win32 ?ends@@YAAAVostream@@AAV1@@Z(ptr) MSVCIRT_ends  # class ostream & __cdecl ends(class ostream &)
-@ cdecl -arch=win64 ?ends@@YAAEAVostream@@AEAV1@@Z(ptr) MSVCIRT_ends
+@ cdecl -arch=win32 ?endl@@YAAAVostream@@AAV1@@Z(ptr) ostream_endl
+@ cdecl -arch=win64 ?endl@@YAAEAVostream@@AEAV1@@Z(ptr) ostream_endl
+@ cdecl -arch=win32 ?ends@@YAAAVostream@@AAV1@@Z(ptr) ostream_ends
+@ cdecl -arch=win64 ?ends@@YAAEAVostream@@AEAV1@@Z(ptr) ostream_ends
 @ thiscall -arch=win32 ?eof@ios@@QBEHXZ(ptr) ios_eof
 @ cdecl -arch=win64 ?eof@ios@@QEBAHXZ(ptr) ios_eof
 @ thiscall -arch=win32 ?epptr@streambuf@@IBEPADXZ(ptr) streambuf_epptr
@@ -485,10 +485,10 @@
 @ thiscall -arch=win32 ?flags@ios@@QBEJXZ(ptr) ios_flags_get
 @ cdecl -arch=win64 ?flags@ios@@QEBAJXZ(ptr) ios_flags_get
 @ extern ?floatfield@ios@@2JB ios_floatfield
-@ stub -arch=win32 ?flush@@YAAAVostream@@AAV1@@Z  # class ostream & __cdecl flush(class ostream &)
-@ stub -arch=win64 ?flush@@YAAEAVostream@@AEAV1@@Z
-@ stub -arch=win32 ?flush@ostream@@QAEAAV1@XZ  # class ostream & __thiscall ostream::flush(void)
-@ stub -arch=win64 ?flush@ostream@@QEAAAEAV1@XZ
+@ cdecl -arch=win32 ?flush@@YAAAVostream@@AAV1@@Z(ptr) ostream_flush_manip
+@ cdecl -arch=win64 ?flush@@YAAEAVostream@@AEAV1@@Z(ptr) ostream_flush_manip
+@ thiscall -arch=win32 ?flush@ostream@@QAEAAV1@XZ(ptr) ostream_flush
+@ cdecl -arch=win64 ?flush@ostream@@QEAAAEAV1@XZ(ptr) ostream_flush
 @ thiscall -arch=win32 ?freeze@strstreambuf@@QAEXH@Z(ptr long) strstreambuf_freeze
 @ cdecl -arch=win64 ?freeze@strstreambuf@@QEAAXH@Z(ptr long) strstreambuf_freeze
 @ thiscall -arch=win32 ?gbump@streambuf@@IAEXH@Z(ptr long) streambuf_gbump
@@ -571,10 +571,10 @@
 @ stub -arch=win32 ?open@ofstream@@QAEXPBDHH@Z  # void __thiscall ofstream::open(char const *,int,int)
 @ stub -arch=win64 ?open@ofstream@@QEAAXPEBDHH@Z
 @ extern ?openprot@filebuf@@2HB filebuf_openprot
-@ stub -arch=win32 ?opfx@ostream@@QAEHXZ  # int __thiscall ostream::opfx(void)
-@ stub -arch=win64 ?opfx@ostream@@QEAAHXZ
-@ stub -arch=win32 ?osfx@ostream@@QAEXXZ  # void __thiscall ostream::osfx(void)
-@ stub -arch=win64 ?osfx@ostream@@QEAAXXZ
+@ thiscall -arch=win32 ?opfx@ostream@@QAEHXZ(ptr) ostream_opfx
+@ cdecl -arch=win64 ?opfx@ostream@@QEAAHXZ(ptr) ostream_opfx
+@ thiscall -arch=win32 ?osfx@ostream@@QAEXXZ(ptr) ostream_osfx
+@ cdecl -arch=win64 ?osfx@ostream@@QEAAXXZ(ptr) ostream_osfx
 @ thiscall -arch=win32 ?out_waiting@streambuf@@QBEHXZ(ptr) streambuf_out_waiting
 @ cdecl -arch=win64 ?out_waiting@streambuf@@QEBAHXZ(ptr) streambuf_out_waiting
 @ thiscall -arch=win32 ?overflow@filebuf@@UAEHH@Z(ptr long) filebuf_overflow
@@ -603,12 +603,12 @@
 @ cdecl -arch=win64 ?precision@ios@@QEAAHH@Z(ptr long) ios_precision_set
 @ thiscall -arch=win32 ?precision@ios@@QBEHXZ(ptr) ios_precision_get
 @ cdecl -arch=win64 ?precision@ios@@QEBAHXZ(ptr) ios_precision_get
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@C@Z  # class ostream & __thiscall ostream::put(signed char)
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@D@Z  # class ostream & __thiscall ostream::put(char)
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@E@Z  # class ostream & __thiscall ostream::put(unsigned char)
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@C@Z(ptr long) ostream_put_signed_char
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z(ptr long) ostream_put_signed_char
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@D@Z(ptr long) ostream_put_char
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z(ptr long) ostream_put_char
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@E@Z(ptr long) ostream_put_unsigned_char
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z(ptr long) ostream_put_unsigned_char
 @ stub -arch=win32 ?putback@istream@@QAEAAV1@D@Z  # class istream & __thiscall istream::putback(char)
 @ stub -arch=win64 ?putback@istream@@QEAAAEAV1@D@Z
 @ thiscall -arch=win32 ?pword@ios@@QBEAAPAXH@Z(ptr long) ios_pword
@@ -651,10 +651,10 @@
 @ cdecl -arch=win64 ?seekoff@streambuf@@UEAAJJW4seek_dir@ios@@H@Z(ptr long long long) streambuf_seekoff
 @ thiscall -arch=win32 ?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z(ptr long long long) strstreambuf_seekoff
 @ cdecl -arch=win64 ?seekoff@strstreambuf@@UEAAJJW4seek_dir@ios@@H@Z(ptr long long long) strstreambuf_seekoff
-@ stub -arch=win32 ?seekp@ostream@@QAEAAV1@J@Z  # class ostream & __thiscall ostream::seekp(long)
-@ stub -arch=win64 ?seekp@ostream@@QEAAAEAV1@J@Z
-@ stub -arch=win32 ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z  # class ostream & __thiscall ostream::seekp(long,enum ios::seek_dir)
-@ stub -arch=win64 ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z
+@ thiscall -arch=win32 ?seekp@ostream@@QAEAAV1@J@Z(ptr long) ostream_seekp
+@ cdecl -arch=win64 ?seekp@ostream@@QEAAAEAV1@J@Z(ptr long) ostream_seekp
+@ thiscall -arch=win32 ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z(ptr long long) ostream_seekp_offset
+@ cdecl -arch=win64 ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z(ptr long long) ostream_seekp_offset
 @ thiscall -arch=win32 ?seekpos@streambuf@@UAEJJH@Z(ptr long long) streambuf_seekpos
 @ cdecl -arch=win64 ?seekpos@streambuf@@UEAAJJH@Z(ptr long long) streambuf_seekpos
 @ thiscall -arch=win32 ?setb@streambuf@@IAEXPAD0H@Z(ptr ptr ptr long) streambuf_setb
@@ -734,8 +734,8 @@
 @ cdecl ?sync_with_stdio@ios@@SAXXZ() ios_sync_with_stdio
 @ stub -arch=win32 ?tellg@istream@@QAEJXZ  # long __thiscall istream::tellg(void)
 @ stub -arch=win64 ?tellg@istream@@QEAAJXZ
-@ stub -arch=win32 ?tellp@ostream@@QAEJXZ  # long __thiscall ostream::tellp(void)
-@ stub -arch=win64 ?tellp@ostream@@QEAAJXZ
+@ thiscall -arch=win32 ?tellp@ostream@@QAEJXZ(ptr) ostream_tellp
+@ cdecl -arch=win64 ?tellp@ostream@@QEAAJXZ(ptr) ostream_tellp
 @ extern ?text@filebuf@@2HB filebuf_text
 @ thiscall -arch=win32 ?tie@ios@@QAEPAVostream@@PAV2@@Z(ptr ptr) ios_tie_set
 @ cdecl -arch=win64 ?tie@ios@@QEAAPEAVostream@@PEAV2@@Z(ptr ptr) ios_tie_set
@@ -766,14 +766,14 @@
 @ cdecl -arch=win64 ?width@ios@@QEAAHH@Z(ptr long) ios_width_set
 @ thiscall -arch=win32 ?width@ios@@QBEHXZ(ptr) ios_width_get
 @ cdecl -arch=win64 ?width@ios@@QEBAHXZ(ptr) ios_width_get
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z  # class ostream & __thiscall ostream::write(signed char const *,int)
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z  # class ostream & __thiscall ostream::write(char const *,int)
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z  # class ostream & __thiscall ostream::write(unsigned char const *,int)
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z
-@ stub -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z  # class ostream & __thiscall ostream::writepad(char const *,char const *)
-@ stub -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z(ptr str long) ostream_write_signed_char
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z(ptr str long) ostream_write_signed_char
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z(ptr str long) ostream_write_char
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z(ptr str long) ostream_write_char
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z(ptr str long) ostream_write_unsigned_char
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z(ptr str long) ostream_write_unsigned_char
+@ thiscall -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z(ptr str str) ostream_writepad
+@ cdecl -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z(ptr str str) ostream_writepad
 @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z  # class istream & __cdecl ws(class istream &)
 @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z
 @ extern ?x_curindex@ios@@0HA ios_curindex
diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec
index cc66e2d600c..fe024631c69 100644
--- a/dlls/msvcrt20/msvcrt20.spec
+++ b/dlls/msvcrt20/msvcrt20.spec
@@ -70,12 +70,12 @@
 @ stub -arch=win64 ??0ofstream@@QEAA@PEBDHH@Z
 @ stub -arch=win32 ??0ofstream@@QAE@XZ
 @ stub -arch=win64 ??0ofstream@@QEAA@XZ
-@ stub -arch=win32 ??0ostream@@IAE@ABV0@@Z
-@ stub -arch=win64 ??0ostream@@IEAA@AEBV0@@Z
-@ stub -arch=win32 ??0ostream@@IAE@XZ
-@ stub -arch=win64 ??0ostream@@IEAA@XZ
-@ stub -arch=win32 ??0ostream@@QAE@PAVstreambuf@@@Z
-@ stub -arch=win64 ??0ostream@@QEAA@PEAVstreambuf@@@Z
+@ thiscall -arch=win32 ??0ostream@@IAE@ABV0@@Z(ptr ptr long) msvcirt.??0ostream@@IAE@ABV0@@Z
+@ cdecl -arch=win64 ??0ostream@@IEAA@AEBV0@@Z(ptr ptr long) msvcirt.??0ostream@@IEAA@AEBV0@@Z
+@ thiscall -arch=win32 ??0ostream@@IAE@XZ(ptr long) msvcirt.??0ostream@@IAE@XZ
+@ cdecl -arch=win64 ??0ostream@@IEAA@XZ(ptr long) msvcirt.??0ostream@@IEAA@XZ
+@ thiscall -arch=win32 ??0ostream@@QAE@PAVstreambuf@@@Z(ptr ptr long) msvcirt.??0ostream@@QAE@PAVstreambuf@@@Z
+@ cdecl -arch=win64 ??0ostream@@QEAA@PEAVstreambuf@@@Z(ptr ptr long) msvcirt.??0ostream@@QEAA@PEAVstreambuf@@@Z
 @ stub -arch=win32 ??0ostream_withassign@@QAE@ABV0@@Z
 @ stub -arch=win64 ??0ostream_withassign@@QEAA@AEBV0@@Z
 @ stub -arch=win32 ??0ostream_withassign@@QAE@PAVstreambuf@@@Z
@@ -138,8 +138,8 @@
 @ stub -arch=win64 ??1istrstream@@UEAA@XZ
 @ stub -arch=win32 ??1ofstream@@UAE@XZ
 @ stub -arch=win64 ??1ofstream@@UEAA@XZ
-@ stub -arch=win32 ??1ostream@@UAE@XZ
-@ stub -arch=win64 ??1ostream@@UEAA@XZ
+@ thiscall -arch=win32 ??1ostream@@UAE@XZ(ptr) msvcirt.??1ostream@@UAE@XZ
+@ cdecl -arch=win64 ??1ostream@@UEAA@XZ(ptr) msvcirt.??1ostream@@UEAA@XZ
 @ stub -arch=win32 ??1ostream_withassign@@UAE@XZ
 @ stub -arch=win64 ??1ostream_withassign@@UEAA@XZ
 @ thiscall -arch=win32 ??1ostrstream@@UAE@XZ(ptr) msvcirt.??1ostrstream@@UAE@XZ
@@ -186,10 +186,10 @@
 @ stub -arch=win64 ??4istrstream@@QEAAAEAV0@AEBV0@@Z
 @ stub -arch=win32 ??4ofstream@@QAEAAV0@ABV0@@Z
 @ stub -arch=win64 ??4ofstream@@QEAAAEAV0@AEBV0@@Z
-@ stub -arch=win32 ??4ostream@@IAEAAV0@ABV0@@Z
-@ stub -arch=win64 ??4ostream@@IEAAAEAV0@AEBV0@@Z
-@ stub -arch=win32 ??4ostream@@IAEAAV0@PAVstreambuf@@@Z
-@ stub -arch=win64 ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z
+@ thiscall -arch=win32 ??4ostream@@IAEAAV0@ABV0@@Z(ptr ptr) msvcirt.??4ostream@@IAEAAV0@ABV0@@Z
+@ cdecl -arch=win64 ??4ostream@@IEAAAEAV0@AEBV0@@Z(ptr ptr) msvcirt.??4ostream@@IEAAAEAV0@AEBV0@@Z
+@ thiscall -arch=win32 ??4ostream@@IAEAAV0@PAVstreambuf@@@Z(ptr ptr) msvcirt.??4ostream@@IAEAAV0@PAVstreambuf@@@Z
+@ cdecl -arch=win64 ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z(ptr ptr) msvcirt.??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z
 @ stub -arch=win32 ??4ostream_withassign@@QAEAAV0@ABV0@@Z
 @ stub -arch=win64 ??4ostream_withassign@@QEAAAEAV0@AEBV0@@Z
 @ stub -arch=win32 ??4ostream_withassign@@QAEAAVostream@@ABV1@@Z
@@ -295,7 +295,7 @@
 # @ extern ??_7istream_withassign@@6B@
 # @ extern ??_7istrstream@@6B@
 # @ extern ??_7ofstream@@6B@
-# @ extern ??_7ostream@@6B@
+@ extern ??_7ostream@@6B@ msvcirt.??_7ostream@@6B@
 # @ extern ??_7ostream_withassign@@6B@
 # @ extern ??_7ostrstream@@6B@
 @ extern ??_7stdiobuf@@6B@ msvcirt.??_7stdiobuf@@6B@
@@ -312,7 +312,7 @@
 # @ extern ??_8istream_withassign@@7B@
 # @ extern ??_8istrstream@@7B@
 # @ extern ??_8ofstream@@7B@
-# @ extern ??_8ostream@@7B@
+@ extern ??_8ostream@@7B@ msvcirt.??_8ostream@@7B@
 # @ extern ??_8ostream_withassign@@7B@
 # @ extern ??_8ostrstream@@7B@
 # @ extern ??_8stdiostream@@7Bistream@@@
@@ -333,8 +333,8 @@
 @ stub -arch=win64 ??_Distrstream@@QEAAXXZ
 @ stub -arch=win32 ??_Dofstream@@QAEXXZ
 @ stub -arch=win64 ??_Dofstream@@QEAAXXZ
-@ stub -arch=win32 ??_Dostream@@QAEXXZ
-@ stub -arch=win64 ??_Dostream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dostream@@QAEXXZ(ptr) msvcirt.??_Dostream@@QAEXXZ
+@ cdecl -arch=win64 ??_Dostream@@QEAAXXZ(ptr) msvcirt.??_Dostream@@QEAAXXZ
 @ stub -arch=win32 ??_Dostream_withassign@@QAEXXZ
 @ stub -arch=win64 ??_Dostream_withassign@@QEAAXXZ
 @ stub -arch=win32 ??_Dostrstream@@QAEXXZ
@@ -353,7 +353,7 @@
 @ stub -arch=win32 ??_Eistream_withassign@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eistrstream@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eofstream@@UAEPAXI@Z
-@ stub -arch=win32 ??_Eostream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Eostream@@UAEPAXI@Z(ptr long) msvcirt.??_Eostream@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eostream_withassign@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eostrstream@@UAEPAXI@Z
 @ thiscall -arch=win32 ??_Estdiobuf@@UAEPAXI@Z(ptr long) msvcirt.??_Estdiobuf@@UAEPAXI@Z
@@ -371,7 +371,7 @@
 @ stub -arch=win32 ??_Gistream_withassign@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gistrstream@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gofstream@@UAEPAXI@Z
-@ stub -arch=win32 ??_Gostream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Gostream@@UAEPAXI@Z(ptr long) msvcirt.??_Gostream@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gostream_withassign@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gostrstream@@UAEPAXI@Z
 @ thiscall -arch=win32 ??_Gstdiobuf@@UAEPAXI@Z(ptr long) msvcirt.??_Gstdiobuf@@UAEPAXI@Z
@@ -473,10 +473,10 @@
 @ thiscall -arch=win32 ?flags@ios@@QBEJXZ(ptr) msvcirt.?flags@ios@@QBEJXZ
 @ cdecl -arch=win64 ?flags@ios@@QEBAJXZ(ptr) msvcirt.?flags@ios@@QEBAJXZ
 @ extern ?floatfield@ios@@2JB msvcirt.?floatfield@ios@@2JB
-@ stub -arch=win32 ?flush@@YAAAVostream@@AAV1@@Z
-@ stub -arch=win64 ?flush@@YAAEAVostream@@AEAV1@@Z
-@ stub -arch=win32 ?flush@ostream@@QAEAAV1@XZ
-@ stub -arch=win64 ?flush@ostream@@QEAAAEAV1@XZ
+@ cdecl -arch=win32 ?flush@@YAAAVostream@@AAV1@@Z(ptr) msvcirt.?flush@@YAAAVostream@@AAV1@@Z
+@ cdecl -arch=win64 ?flush@@YAAEAVostream@@AEAV1@@Z(ptr) msvcirt.?flush@@YAAEAVostream@@AEAV1@@Z
+@ thiscall -arch=win32 ?flush@ostream@@QAEAAV1@XZ(ptr) msvcirt.?flush@ostream@@QAEAAV1@XZ
+@ cdecl -arch=win64 ?flush@ostream@@QEAAAEAV1@XZ(ptr) msvcirt.?flush@ostream@@QEAAAEAV1@XZ
 @ thiscall -arch=win32 ?freeze@strstreambuf@@QAEXH@Z(ptr long) msvcirt.?freeze@strstreambuf@@QAEXH@Z
 @ cdecl -arch=win64 ?freeze@strstreambuf@@QEAAXH@Z(ptr long) msvcirt.?freeze@strstreambuf@@QEAAXH@Z
 @ thiscall -arch=win32 ?gbump@streambuf@@IAEXH@Z(ptr long) msvcirt.?gbump@streambuf@@IAEXH@Z
@@ -557,10 +557,10 @@
 @ stub -arch=win32 ?open@ofstream@@QAEXPBDHH@Z
 @ stub -arch=win64 ?open@ofstream@@QEAAXPEBDHH@Z
 @ extern ?openprot@filebuf@@2HB msvcirt.?openprot@filebuf@@2HB
-@ stub -arch=win32 ?opfx@ostream@@QAEHXZ
-@ stub -arch=win64 ?opfx@ostream@@QEAAHXZ
-@ stub -arch=win32 ?osfx@ostream@@QAEXXZ
-@ stub -arch=win64 ?osfx@ostream@@QEAAXXZ
+@ thiscall -arch=win32 ?opfx@ostream@@QAEHXZ(ptr) msvcirt.?opfx@ostream@@QAEHXZ
+@ cdecl -arch=win64 ?opfx@ostream@@QEAAHXZ(ptr) msvcirt.?opfx@ostream@@QEAAHXZ
+@ thiscall -arch=win32 ?osfx@ostream@@QAEXXZ(ptr) msvcirt.?osfx@ostream@@QAEXXZ
+@ cdecl -arch=win64 ?osfx@ostream@@QEAAXXZ(ptr) msvcirt.?osfx@ostream@@QEAAXXZ
 @ thiscall -arch=win32 ?out_waiting@streambuf@@QBEHXZ(ptr) msvcirt.?out_waiting@streambuf@@QBEHXZ
 @ cdecl -arch=win64 ?out_waiting@streambuf@@QEBAHXZ(ptr) msvcirt.?out_waiting@streambuf@@QEBAHXZ
 @ thiscall -arch=win32 ?overflow@filebuf@@UAEHH@Z(ptr long) msvcirt.?overflow@filebuf@@UAEHH@Z
@@ -589,12 +589,12 @@
 @ cdecl -arch=win64 ?precision@ios@@QEAAHH@Z(ptr long) msvcirt.?precision@ios@@QEAAHH@Z
 @ thiscall -arch=win32 ?precision@ios@@QBEHXZ(ptr) msvcirt.?precision@ios@@QBEHXZ
 @ cdecl -arch=win64 ?precision@ios@@QEBAHXZ(ptr) msvcirt.?precision@ios@@QEBAHXZ
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@C@Z
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@D@Z
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@E@Z
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@C@Z(ptr long) msvcirt.?put@ostream@@QAEAAV1@C@Z
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z(ptr long) msvcirt.?put@ostream@@QEAAAEAV1@C@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@D@Z(ptr long) msvcirt.?put@ostream@@QAEAAV1@D@Z
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z(ptr long) msvcirt.?put@ostream@@QEAAAEAV1@D@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@E@Z(ptr long) msvcirt.?put@ostream@@QAEAAV1@E@Z
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z(ptr long) msvcirt.?put@ostream@@QEAAAEAV1@E@Z
 @ stub -arch=win32 ?putback@istream@@QAEAAV1@D@Z
 @ stub -arch=win64 ?putback@istream@@QEAAAEAV1@D@Z
 @ thiscall -arch=win32 ?pword@ios@@QBEAAPAXH@Z(ptr long) msvcirt.?pword@ios@@QBEAAPAXH@Z
@@ -637,10 +637,10 @@
 @ cdecl -arch=win64 ?seekoff@streambuf@@UEAAJJW4seek_dir@ios@@H@Z(ptr long long long) msvcirt.?seekoff@streambuf@@UEAAJJW4seek_dir@ios@@H@Z
 @ thiscall -arch=win32 ?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z(ptr long long long) msvcirt.?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z
 @ cdecl -arch=win64 ?seekoff@strstreambuf@@UEAAJJW4seek_dir@ios@@H@Z(ptr long long long) msvcirt.?seekoff@strstreambuf@@UEAAJJW4seek_dir@ios@@H@Z
-@ stub -arch=win32 ?seekp@ostream@@QAEAAV1@J@Z
-@ stub -arch=win64 ?seekp@ostream@@QEAAAEAV1@J@Z
-@ stub -arch=win32 ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z
-@ stub -arch=win64 ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z
+@ thiscall -arch=win32 ?seekp@ostream@@QAEAAV1@J@Z(ptr long) msvcirt.?seekp@ostream@@QAEAAV1@J@Z
+@ cdecl -arch=win64 ?seekp@ostream@@QEAAAEAV1@J@Z(ptr long) msvcirt.?seekp@ostream@@QEAAAEAV1@J@Z
+@ thiscall -arch=win32 ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z(ptr long long) msvcirt.?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z
+@ cdecl -arch=win64 ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z(ptr long long) msvcirt.?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z
 @ thiscall -arch=win32 ?seekpos@streambuf@@UAEJJH@Z(ptr long long) msvcirt.?seekpos@streambuf@@UAEJJH@Z
 @ cdecl -arch=win64 ?seekpos@streambuf@@UEAAJJH@Z(ptr long long) msvcirt.?seekpos@streambuf@@UEAAJJH@Z
 @ cdecl ?set_terminate@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_terminate@@YAP6AXXZP6AXXZ@Z
@@ -722,8 +722,8 @@
 @ cdecl ?sync_with_stdio@ios@@SAXXZ() msvcirt.?sync_with_stdio@ios@@SAXXZ
 @ stub -arch=win32 ?tellg@istream@@QAEJXZ
 @ stub -arch=win64 ?tellg@istream@@QEAAJXZ
-@ stub -arch=win32 ?tellp@ostream@@QAEJXZ
-@ stub -arch=win64 ?tellp@ostream@@QEAAJXZ
+@ thiscall -arch=win32 ?tellp@ostream@@QAEJXZ(ptr) msvcirt.?tellp@ostream@@QAEJXZ
+@ cdecl -arch=win64 ?tellp@ostream@@QEAAJXZ(ptr) msvcirt.?tellp@ostream@@QEAAJXZ
 @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ
 @ extern ?text@filebuf@@2HB msvcirt.?text@filebuf@@2HB
 @ thiscall -arch=win32 ?tie@ios@@QAEPAVostream@@PAV2@@Z(ptr ptr) msvcirt.?tie@ios@@QAEPAVostream@@PAV2@@Z
@@ -754,14 +754,14 @@
 @ cdecl -arch=win64 ?width@ios@@QEAAHH@Z(ptr long) msvcirt.?width@ios@@QEAAHH@Z
 @ thiscall -arch=win32 ?width@ios@@QBEHXZ(ptr) msvcirt.?width@ios@@QBEHXZ
 @ cdecl -arch=win64 ?width@ios@@QEBAHXZ(ptr) msvcirt.?width@ios@@QEBAHXZ
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z
-@ stub -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z
-@ stub -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z(ptr str long) msvcirt.?write@ostream@@QAEAAV1@PBCH@Z
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z(ptr str long) msvcirt.?write@ostream@@QEAAAEAV1@PEBCH@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z(ptr str long) msvcirt.?write@ostream@@QAEAAV1@PBDH@Z
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z(ptr str long) msvcirt.?write@ostream@@QEAAAEAV1@PEBDH@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z(ptr str long) msvcirt.?write@ostream@@QAEAAV1@PBEH@Z
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z(ptr str long) msvcirt.?write@ostream@@QEAAAEAV1@PEBEH@Z
+@ thiscall -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z(ptr str str) msvcirt.?writepad@ostream@@AAEAAV1@PBD0@Z
+@ cdecl -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z(ptr str str) msvcirt.?writepad@ostream@@AEAAAEAV1@PEBD0@Z
 @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z
 @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z
 @ extern ?x_curindex@ios@@0HA msvcirt.?x_curindex@ios@@0HA
diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec
index 35cc38826de..ee6cf79915f 100644
--- a/dlls/msvcrt40/msvcrt40.spec
+++ b/dlls/msvcrt40/msvcrt40.spec
@@ -92,12 +92,12 @@
 @ stub -arch=win64 ??0ofstream@@QEAA@PEBDHH@Z
 @ stub -arch=win32 ??0ofstream@@QAE@XZ
 @ stub -arch=win64 ??0ofstream@@QEAA@XZ
-@ stub -arch=win32 ??0ostream@@IAE@ABV0@@Z
-@ stub -arch=win64 ??0ostream@@IEAA@AEBV0@@Z
-@ stub -arch=win32 ??0ostream@@IAE@XZ
-@ stub -arch=win64 ??0ostream@@IEAA@XZ
-@ stub -arch=win32 ??0ostream@@QAE@PAVstreambuf@@@Z
-@ stub -arch=win64 ??0ostream@@QEAA@PEAVstreambuf@@@Z
+@ thiscall -arch=win32 ??0ostream@@IAE@ABV0@@Z(ptr ptr long) msvcirt.??0ostream@@IAE@ABV0@@Z
+@ cdecl -arch=win64 ??0ostream@@IEAA@AEBV0@@Z(ptr ptr long) msvcirt.??0ostream@@IEAA@AEBV0@@Z
+@ thiscall -arch=win32 ??0ostream@@IAE@XZ(ptr long) msvcirt.??0ostream@@IAE@XZ
+@ cdecl -arch=win64 ??0ostream@@IEAA@XZ(ptr long) msvcirt.??0ostream@@IEAA@XZ
+@ thiscall -arch=win32 ??0ostream@@QAE@PAVstreambuf@@@Z(ptr ptr long) msvcirt.??0ostream@@QAE@PAVstreambuf@@@Z
+@ cdecl -arch=win64 ??0ostream@@QEAA@PEAVstreambuf@@@Z(ptr ptr long) msvcirt.??0ostream@@QEAA@PEAVstreambuf@@@Z
 @ stub -arch=win32 ??0ostream_withassign@@QAE@ABV0@@Z
 @ stub -arch=win64 ??0ostream_withassign@@QEAA@AEBV0@@Z
 @ stub -arch=win32 ??0ostream_withassign@@QAE@PAVstreambuf@@@Z
@@ -170,8 +170,8 @@
 @ cdecl -arch=win64 ??1logic_error@@UEAA@XZ(ptr) msvcirt.??1logic_error@@UEAA@XZ
 @ stub -arch=win32 ??1ofstream@@UAE@XZ
 @ stub -arch=win64 ??1ofstream@@UEAA@XZ
-@ stub -arch=win32 ??1ostream@@UAE@XZ
-@ stub -arch=win64 ??1ostream@@UEAA@XZ
+@ thiscall -arch=win32 ??1ostream@@UAE@XZ(ptr) msvcirt.??1ostream@@UAE@XZ
+@ cdecl -arch=win64 ??1ostream@@UEAA@XZ(ptr) msvcirt.??1ostream@@UEAA@XZ
 @ stub -arch=win32 ??1ostream_withassign@@UAE@XZ
 @ stub -arch=win64 ??1ostream_withassign@@UEAA@XZ
 @ thiscall -arch=win32 ??1ostrstream@@UAE@XZ(ptr) msvcirt.??1ostrstream@@UAE@XZ
@@ -230,10 +230,10 @@
 @ cdecl -arch=win64 ??4logic_error@@QEAAAEAV0@AEBV0@@Z(ptr ptr) msvcirt.??4logic_error@@QEAAAEAV0@AEBV0@@Z
 @ stub -arch=win32 ??4ofstream@@QAEAAV0@ABV0@@Z
 @ stub -arch=win64 ??4ofstream@@QEAAAEAV0@AEBV0@@Z
-@ stub -arch=win32 ??4ostream@@IAEAAV0@ABV0@@Z
-@ stub -arch=win64 ??4ostream@@IEAAAEAV0@AEBV0@@Z
-@ stub -arch=win32 ??4ostream@@IAEAAV0@PAVstreambuf@@@Z
-@ stub -arch=win64 ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z
+@ thiscall -arch=win32 ??4ostream@@IAEAAV0@ABV0@@Z(ptr ptr) msvcirt.??4ostream@@IAEAAV0@ABV0@@Z
+@ cdecl -arch=win64 ??4ostream@@IEAAAEAV0@AEBV0@@Z(ptr ptr) msvcirt.??4ostream@@IEAAAEAV0@AEBV0@@Z
+@ thiscall -arch=win32 ??4ostream@@IAEAAV0@PAVstreambuf@@@Z(ptr ptr) msvcirt.??4ostream@@IAEAAV0@PAVstreambuf@@@Z
+@ cdecl -arch=win64 ??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z(ptr ptr) msvcirt.??4ostream@@IEAAAEAV0@PEAVstreambuf@@@Z
 @ stub -arch=win32 ??4ostream_withassign@@QAEAAV0@ABV0@@Z
 @ stub -arch=win64 ??4ostream_withassign@@QEAAAEAV0@AEBV0@@Z
 @ stub -arch=win32 ??4ostream_withassign@@QAEAAVostream@@ABV1@@Z
@@ -348,7 +348,7 @@
 # @ extern ??_7istrstream@@6B@
 @ extern ??_7logic_error@@6B@ msvcirt.??_7logic_error@@6B@
 # @ extern ??_7ofstream@@6B@
-# @ extern ??_7ostream@@6B@
+@ extern ??_7ostream@@6B@ msvcirt.??_7ostream@@6B@
 # @ extern ??_7ostream_withassign@@6B@
 # @ extern ??_7ostrstream@@6B@
 @ extern ??_7stdiobuf@@6B@ msvcirt.??_7stdiobuf@@6B@
@@ -365,7 +365,7 @@
 # @ extern ??_8istream_withassign@@7B@
 # @ extern ??_8istrstream@@7B@
 # @ extern ??_8ofstream@@7B@
-# @ extern ??_8ostream@@7B@
+@ extern ??_8ostream@@7B@ msvcirt.??_8ostream@@7B@
 # @ extern ??_8ostream_withassign@@7B@
 # @ extern ??_8ostrstream@@7B@
 # @ extern ??_8stdiostream@@7Bistream@@@
@@ -386,8 +386,8 @@
 @ stub -arch=win64 ??_Distrstream@@QEAAXXZ
 @ stub -arch=win32 ??_Dofstream@@QAEXXZ
 @ stub -arch=win64 ??_Dofstream@@QEAAXXZ
-@ stub -arch=win32 ??_Dostream@@QAEXXZ
-@ stub -arch=win64 ??_Dostream@@QEAAXXZ
+@ thiscall -arch=win32 ??_Dostream@@QAEXXZ(ptr) msvcirt.??_Dostream@@QAEXXZ
+@ cdecl -arch=win64 ??_Dostream@@QEAAXXZ(ptr) msvcirt.??_Dostream@@QEAAXXZ
 @ stub -arch=win32 ??_Dostream_withassign@@QAEXXZ
 @ stub -arch=win64 ??_Dostream_withassign@@QEAAXXZ
 @ stub -arch=win32 ??_Dostrstream@@QAEXXZ
@@ -411,7 +411,7 @@
 @ stub -arch=win32 ??_Eistrstream@@UAEPAXI@Z
 @ thiscall -arch=win32 ??_Elogic_error@@UAEPAXI@Z(ptr long) msvcirt.??_Elogic_error@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eofstream@@UAEPAXI@Z
-@ stub -arch=win32 ??_Eostream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Eostream@@UAEPAXI@Z(ptr long) msvcirt.??_Eostream@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eostream_withassign@@UAEPAXI@Z
 @ stub -arch=win32 ??_Eostrstream@@UAEPAXI@Z
 @ thiscall -arch=win32 ??_Estdiobuf@@UAEPAXI@Z(ptr long) msvcirt.??_Estdiobuf@@UAEPAXI@Z
@@ -434,7 +434,7 @@
 @ stub -arch=win32 ??_Gistrstream@@UAEPAXI@Z
 @ thiscall -arch=win32 ??_Glogic_error@@UAEPAXI@Z(ptr long) msvcirt.??_Glogic_error@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gofstream@@UAEPAXI@Z
-@ stub -arch=win32 ??_Gostream@@UAEPAXI@Z
+@ thiscall -arch=win32 ??_Gostream@@UAEPAXI@Z(ptr long) msvcirt.??_Gostream@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gostream_withassign@@UAEPAXI@Z
 @ stub -arch=win32 ??_Gostrstream@@UAEPAXI@Z
 @ thiscall -arch=win32 ??_Gstdiobuf@@UAEPAXI@Z(ptr long) msvcirt.??_Gstdiobuf@@UAEPAXI@Z
@@ -538,10 +538,10 @@
 @ thiscall -arch=win32 ?flags@ios@@QBEJXZ(ptr) msvcirt.?flags@ios@@QBEJXZ
 @ cdecl -arch=win64 ?flags@ios@@QEBAJXZ(ptr) msvcirt.?flags@ios@@QEBAJXZ
 @ extern ?floatfield@ios@@2JB msvcirt.?floatfield@ios@@2JB
-@ stub -arch=win32 ?flush@@YAAAVostream@@AAV1@@Z
-@ stub -arch=win64 ?flush@@YAAEAVostream@@AEAV1@@Z
-@ stub -arch=win32 ?flush@ostream@@QAEAAV1@XZ
-@ stub -arch=win64 ?flush@ostream@@QEAAAEAV1@XZ
+@ cdecl -arch=win32 ?flush@@YAAAVostream@@AAV1@@Z(ptr) msvcirt.?flush@@YAAAVostream@@AAV1@@Z
+@ cdecl -arch=win64 ?flush@@YAAEAVostream@@AEAV1@@Z(ptr) msvcirt.?flush@@YAAEAVostream@@AEAV1@@Z
+@ thiscall -arch=win32 ?flush@ostream@@QAEAAV1@XZ(ptr) msvcirt.?flush@ostream@@QAEAAV1@XZ
+@ cdecl -arch=win64 ?flush@ostream@@QEAAAEAV1@XZ(ptr) msvcirt.?flush@ostream@@QEAAAEAV1@XZ
 @ thiscall -arch=win32 ?freeze@strstreambuf@@QAEXH@Z(ptr long) msvcirt.?freeze@strstreambuf@@QAEXH@Z
 @ cdecl -arch=win64 ?freeze@strstreambuf@@QEAAXH@Z(ptr long) msvcirt.?freeze@strstreambuf@@QEAAXH@Z
 @ thiscall -arch=win32 ?gbump@streambuf@@IAEXH@Z(ptr long) msvcirt.?gbump@streambuf@@IAEXH@Z
@@ -626,10 +626,10 @@
 @ stub -arch=win32 ?open@ofstream@@QAEXPBDHH@Z
 @ stub -arch=win64 ?open@ofstream@@QEAAXPEBDHH@Z
 @ extern ?openprot@filebuf@@2HB msvcirt.?openprot@filebuf@@2HB
-@ stub -arch=win32 ?opfx@ostream@@QAEHXZ
-@ stub -arch=win64 ?opfx@ostream@@QEAAHXZ
-@ stub -arch=win32 ?osfx@ostream@@QAEXXZ
-@ stub -arch=win64 ?osfx@ostream@@QEAAXXZ
+@ thiscall -arch=win32 ?opfx@ostream@@QAEHXZ(ptr) msvcirt.?opfx@ostream@@QAEHXZ
+@ cdecl -arch=win64 ?opfx@ostream@@QEAAHXZ(ptr) msvcirt.?opfx@ostream@@QEAAHXZ
+@ thiscall -arch=win32 ?osfx@ostream@@QAEXXZ(ptr) msvcirt.?osfx@ostream@@QAEXXZ
+@ cdecl -arch=win64 ?osfx@ostream@@QEAAXXZ(ptr) msvcirt.?osfx@ostream@@QEAAXXZ
 @ thiscall -arch=win32 ?out_waiting@streambuf@@QBEHXZ(ptr) msvcirt.?out_waiting@streambuf@@QBEHXZ
 @ cdecl -arch=win64 ?out_waiting@streambuf@@QEBAHXZ(ptr) msvcirt.?out_waiting@streambuf@@QEBAHXZ
 @ thiscall -arch=win32 ?overflow@filebuf@@UAEHH@Z(ptr long) msvcirt.?overflow@filebuf@@UAEHH@Z
@@ -658,12 +658,12 @@
 @ cdecl -arch=win64 ?precision@ios@@QEAAHH@Z(ptr long) msvcirt.?precision@ios@@QEAAHH@Z
 @ thiscall -arch=win32 ?precision@ios@@QBEHXZ(ptr) msvcirt.?precision@ios@@QBEHXZ
 @ cdecl -arch=win64 ?precision@ios@@QEBAHXZ(ptr) msvcirt.?precision@ios@@QEBAHXZ
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@C@Z
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@D@Z
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z
-@ stub -arch=win32 ?put@ostream@@QAEAAV1@E@Z
-@ stub -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@C@Z(ptr long) msvcirt.?put@ostream@@QAEAAV1@C@Z
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@C@Z(ptr long) msvcirt.?put@ostream@@QEAAAEAV1@C@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@D@Z(ptr long) msvcirt.?put@ostream@@QAEAAV1@D@Z
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@D@Z(ptr long) msvcirt.?put@ostream@@QEAAAEAV1@D@Z
+@ thiscall -arch=win32 ?put@ostream@@QAEAAV1@E@Z(ptr long) msvcirt.?put@ostream@@QAEAAV1@E@Z
+@ cdecl -arch=win64 ?put@ostream@@QEAAAEAV1@E@Z(ptr long) msvcirt.?put@ostream@@QEAAAEAV1@E@Z
 @ stub -arch=win32 ?putback@istream@@QAEAAV1@D@Z
 @ stub -arch=win64 ?putback@istream@@QEAAAEAV1@D@Z
 @ thiscall -arch=win32 ?pword@ios@@QBEAAPAXH@Z(ptr long) msvcirt.?pword@ios@@QBEAAPAXH@Z
@@ -708,10 +708,10 @@
 @ cdecl -arch=win64 ?seekoff@streambuf@@UEAAJJW4seek_dir@ios@@H@Z(ptr long long long) msvcirt.?seekoff@streambuf@@UEAAJJW4seek_dir@ios@@H@Z
 @ thiscall -arch=win32 ?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z(ptr long long long) msvcirt.?seekoff@strstreambuf@@UAEJJW4seek_dir@ios@@H@Z
 @ cdecl -arch=win64 ?seekoff@strstreambuf@@UEAAJJW4seek_dir@ios@@H@Z(ptr long long long) msvcirt.?seekoff@strstreambuf@@UEAAJJW4seek_dir@ios@@H@Z
-@ stub -arch=win32 ?seekp@ostream@@QAEAAV1@J@Z
-@ stub -arch=win64 ?seekp@ostream@@QEAAAEAV1@J@Z
-@ stub -arch=win32 ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z
-@ stub -arch=win64 ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z
+@ thiscall -arch=win32 ?seekp@ostream@@QAEAAV1@J@Z(ptr long) msvcirt.?seekp@ostream@@QAEAAV1@J@Z
+@ cdecl -arch=win64 ?seekp@ostream@@QEAAAEAV1@J@Z(ptr long) msvcirt.?seekp@ostream@@QEAAAEAV1@J@Z
+@ thiscall -arch=win32 ?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z(ptr long long) msvcirt.?seekp@ostream@@QAEAAV1@JW4seek_dir@ios@@@Z
+@ cdecl -arch=win64 ?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z(ptr long long) msvcirt.?seekp@ostream@@QEAAAEAV1@JW4seek_dir@ios@@@Z
 @ thiscall -arch=win32 ?seekpos@streambuf@@UAEJJH@Z(ptr long long) msvcirt.?seekpos@streambuf@@UAEJJH@Z
 @ cdecl -arch=win64 ?seekpos@streambuf@@UEAAJJH@Z(ptr long long) msvcirt.?seekpos@streambuf@@UEAAJJH@Z
 @ cdecl ?set_new_handler@@YAP6AXXZP6AXXZ@Z(ptr) msvcrt.?set_new_handler@@YAP6AXXZP6AXXZ@Z
@@ -794,8 +794,8 @@
 @ cdecl ?sync_with_stdio@ios@@SAXXZ() msvcirt.?sync_with_stdio@ios@@SAXXZ
 @ stub -arch=win32 ?tellg@istream@@QAEJXZ
 @ stub -arch=win64 ?tellg@istream@@QEAAJXZ
-@ stub -arch=win32 ?tellp@ostream@@QAEJXZ
-@ stub -arch=win64 ?tellp@ostream@@QEAAJXZ
+@ thiscall -arch=win32 ?tellp@ostream@@QAEJXZ(ptr) msvcirt.?tellp@ostream@@QAEJXZ
+@ cdecl -arch=win64 ?tellp@ostream@@QEAAJXZ(ptr) msvcirt.?tellp@ostream@@QEAAJXZ
 @ cdecl ?terminate@@YAXXZ() msvcrt.?terminate@@YAXXZ
 @ extern ?text@filebuf@@2HB msvcirt.?text@filebuf@@2HB
 @ thiscall -arch=win32 ?tie@ios@@QAEPAVostream@@PAV2@@Z(ptr ptr) msvcirt.?tie@ios@@QAEPAVostream@@PAV2@@Z
@@ -828,14 +828,14 @@
 @ cdecl -arch=win64 ?width@ios@@QEAAHH@Z(ptr long) msvcirt.?width@ios@@QEAAHH@Z
 @ thiscall -arch=win32 ?width@ios@@QBEHXZ(ptr) msvcirt.?width@ios@@QBEHXZ
 @ cdecl -arch=win64 ?width@ios@@QEBAHXZ(ptr) msvcirt.?width@ios@@QEBAHXZ
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z
-@ stub -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z
-@ stub -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z
-@ stub -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z
-@ stub -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBCH@Z(ptr str long) msvcirt.?write@ostream@@QAEAAV1@PBCH@Z
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBCH@Z(ptr str long) msvcirt.?write@ostream@@QEAAAEAV1@PEBCH@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBDH@Z(ptr str long) msvcirt.?write@ostream@@QAEAAV1@PBDH@Z
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBDH@Z(ptr str long) msvcirt.?write@ostream@@QEAAAEAV1@PEBDH@Z
+@ thiscall -arch=win32 ?write@ostream@@QAEAAV1@PBEH@Z(ptr str long) msvcirt.?write@ostream@@QAEAAV1@PBEH@Z
+@ cdecl -arch=win64 ?write@ostream@@QEAAAEAV1@PEBEH@Z(ptr str long) msvcirt.?write@ostream@@QEAAAEAV1@PEBEH@Z
+@ thiscall -arch=win32 ?writepad@ostream@@AAEAAV1@PBD0@Z(ptr str str) msvcirt.?writepad@ostream@@AAEAAV1@PBD0@Z
+@ cdecl -arch=win64 ?writepad@ostream@@AEAAAEAV1@PEBD0@Z(ptr str str) msvcirt.?writepad@ostream@@AEAAAEAV1@PEBD0@Z
 @ stub -arch=win32 ?ws@@YAAAVistream@@AAV1@@Z
 @ stub -arch=win64 ?ws@@YAAEAVistream@@AEAV1@@Z
 @ extern ?x_curindex@ios@@0HA msvcirt.?x_curindex@ios@@0HA
-- 
GitLab