Piotr Caban : msvcp110: Fix basic_streambuf structure layout.
Alexandre Julliard
julliard at winehq.org
Tue Jan 14 13:45:00 CST 2014
Module: wine
Branch: master
Commit: 08e851f3c63190c62e94c49b8f87e0de7a6434ce
URL: http://source.winehq.org/git/wine.git/?a=commit;h=08e851f3c63190c62e94c49b8f87e0de7a6434ce
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Jan 14 13:55:56 2014 +0100
msvcp110: Fix basic_streambuf structure layout.
---
dlls/msvcp90/ios.c | 20 ++++++++++++++++++++
dlls/msvcp90/msvcp90.h | 4 ++++
2 files changed, 24 insertions(+)
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index c44a7a5..a89352e 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -1003,7 +1003,9 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor_uninitialized(basic_s
{
TRACE("(%p %d)\n", this, uninitialized);
this->vtable = &MSVCP_basic_streambuf_char_vtable;
+#if _MSVCP_VER <= 100
mutex_ctor(&this->lock);
+#endif
return this;
}
@@ -1015,7 +1017,9 @@ basic_streambuf_char* __thiscall basic_streambuf_char_ctor(basic_streambuf_char
TRACE("(%p)\n", this);
this->vtable = &MSVCP_basic_streambuf_char_vtable;
+#if _MSVCP_VER <= 100
mutex_ctor(&this->lock);
+#endif
this->loc = MSVCRT_operator_new(sizeof(locale));
locale_ctor(this->loc);
basic_streambuf_char__Init_empty(this);
@@ -1030,7 +1034,9 @@ void __thiscall basic_streambuf_char_dtor(basic_streambuf_char *this)
{
TRACE("(%p)\n", this);
+#if _MSVCP_VER <= 100
mutex_dtor(&this->lock);
+#endif
locale_dtor(this->loc);
MSVCRT_operator_delete(this->loc);
}
@@ -1122,7 +1128,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Lock, 4)
void __thiscall basic_streambuf_char__Lock(basic_streambuf_char *this)
{
TRACE("(%p)\n", this);
+#if _MSVCP_VER <= 100
mutex_lock(&this->lock);
+#endif
}
/* ?_Pnavail@?$basic_streambuf at DU?$char_traits at D@std@@@std@@IBEHXZ */
@@ -1248,7 +1256,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_char__Unlock, 4)
void __thiscall basic_streambuf_char__Unlock(basic_streambuf_char *this)
{
TRACE("(%p)\n", this);
+#if _MSVCP_VER <= 100
mutex_unlock(&this->lock);
+#endif
}
/* ?eback@?$basic_streambuf at DU?$char_traits at D@std@@@std@@IBEPADXZ */
@@ -1801,7 +1811,9 @@ basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor_uninitialized(basic
{
TRACE("(%p %d)\n", this, uninitialized);
this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
+#if _MSVCP_VER <= 100
mutex_ctor(&this->lock);
+#endif
return this;
}
@@ -1824,7 +1836,9 @@ basic_streambuf_wchar* __thiscall basic_streambuf_wchar_ctor(basic_streambuf_wch
TRACE("(%p)\n", this);
this->vtable = &MSVCP_basic_streambuf_wchar_vtable;
+#if _MSVCP_VER <= 100
mutex_ctor(&this->lock);
+#endif
this->loc = MSVCRT_operator_new(sizeof(locale));
locale_ctor(this->loc);
basic_streambuf_wchar__Init_empty(this);
@@ -1852,7 +1866,9 @@ void __thiscall basic_streambuf_wchar_dtor(basic_streambuf_wchar *this)
{
TRACE("(%p)\n", this);
+#if _MSVCP_VER <= 100
mutex_dtor(&this->lock);
+#endif
locale_dtor(this->loc);
MSVCRT_operator_delete(this->loc);
}
@@ -1951,7 +1967,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Lock, 4)
void __thiscall basic_streambuf_wchar__Lock(basic_streambuf_wchar *this)
{
TRACE("(%p)\n", this);
+#if _MSVCP_VER <= 100
mutex_lock(&this->lock);
+#endif
}
/* ?_Pnavail@?$basic_streambuf at _WU?$char_traits at _W@std@@@std@@IBEHXZ */
@@ -2086,7 +2104,9 @@ DEFINE_THISCALL_WRAPPER(basic_streambuf_wchar__Unlock, 4)
void __thiscall basic_streambuf_wchar__Unlock(basic_streambuf_wchar *this)
{
TRACE("(%p)\n", this);
+#if _MSVCP_VER <= 100
mutex_unlock(&this->lock);
+#endif
}
/* ?eback@?$basic_streambuf at _WU?$char_traits at _W@std@@@std@@IBEPA_WXZ */
diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h
index 026a04d..67ea924 100644
--- a/dlls/msvcp90/msvcp90.h
+++ b/dlls/msvcp90/msvcp90.h
@@ -328,7 +328,9 @@ typedef struct _ios_base {
/* class basic_streambuf<char> */
typedef struct {
const vtable_ptr *vtable;
+#if _MSVCP_VER <= 100
mutex lock;
+#endif
char *rbuf;
char *wbuf;
char **prbuf;
@@ -365,7 +367,9 @@ int __thiscall basic_streambuf_char_sputc(basic_streambuf_char*, char);
/* class basic_streambuf<wchar> */
typedef struct {
const vtable_ptr *vtable;
+#if _MSVCP_VER <= 100
mutex lock;
+#endif
wchar_t *rbuf;
wchar_t *wbuf;
wchar_t **prbuf;
More information about the wine-cvs
mailing list