Dan Kegel : msvcp100: Add _Container_base0::_Swap_all, _Container_base0:: _Orphan_all.
Alexandre Julliard
julliard at winehq.org
Wed Jul 25 16:06:54 CDT 2012
Module: wine
Branch: master
Commit: 47b9dd1b55979bd810517f2bf4e0f5947c73ab60
URL: http://source.winehq.org/git/wine.git/?a=commit;h=47b9dd1b55979bd810517f2bf4e0f5947c73ab60
Author: Dan Kegel <dank at kegel.com>
Date: Tue Jul 24 13:33:40 2012 -0700
msvcp100: Add _Container_base0::_Swap_all, _Container_base0::_Orphan_all.
---
dlls/msvcp100/msvcp100.c | 46 +++++++++++++++++++++++++++++++++++++++++++
dlls/msvcp100/msvcp100.spec | 8 +++---
2 files changed, 50 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcp100/msvcp100.c b/dlls/msvcp100/msvcp100.c
index ed44b72..6a24a97 100644
--- a/dlls/msvcp100/msvcp100.c
+++ b/dlls/msvcp100/msvcp100.c
@@ -18,14 +18,60 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
+/* Copied from dlls/msvcrt/cpp.c */
+#ifdef __i386__ /* thiscall functions are i386-specific */
+
+#define THISCALL(func) __thiscall_ ## func
+#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
+#define __thiscall __stdcall
+#define DEFINE_THISCALL_WRAPPER(func,args) \
+ extern void THISCALL(func)(void); \
+ __ASM_GLOBAL_FUNC(__thiscall_ ## func, \
+ "popl %eax\n\t" \
+ "pushl %ecx\n\t" \
+ "pushl %eax\n\t" \
+ "jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
+#else /* __i386__ */
+
+#define THISCALL(func) func
+#define THISCALL_NAME(func) __ASM_NAME(#func)
+#define __thiscall __cdecl
+#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */
+
+#endif /* __i386__ */
+
/* ?_BADOFF at std@@3_JB -> __int64 const std::_BADOFF */
const __int64 std_BADOFF = -1;
+/* _Container_base0 is used by apps compiled without iterator checking
+ * (i.e. with _ITERATOR_DEBUG_LEVEL=0 ).
+ * It provides empty versions of methods used by visual c++'s stl's
+ * iterator checking.
+ * msvcr100 has to provide them in case apps are compiled with /Od
+ * or the optimizer fails to inline those (empty) calls.
+ */
+
+/* ?_Orphan_all at _Container_base0@std@@QAEXXZ */
+/* ?_Orphan_all at _Container_base0@std@@QEAAXXZ */
+DEFINE_THISCALL_WRAPPER(Container_base0_Orphan_all, 4)
+void __thiscall Container_base0_Orphan_all(void *this)
+{
+}
+
+/* ?_Swap_all at _Container_base0@std@@QAEXAAU12@@Z */
+/* ?_Swap_all at _Container_base0@std@@QEAAXAEAU12@@Z */
+DEFINE_THISCALL_WRAPPER(Container_base0_Swap_all, 8)
+void __thiscall Container_base0_Swap_all(void *this, void *that)
+{
+}
+
BOOL WINAPI DllMain(HINSTANCE hdll, DWORD reason, LPVOID reserved)
{
switch (reason)
diff --git a/dlls/msvcp100/msvcp100.spec b/dlls/msvcp100/msvcp100.spec
index c26de60..5fb3c39 100644
--- a/dlls/msvcp100/msvcp100.spec
+++ b/dlls/msvcp100/msvcp100.spec
@@ -1123,8 +1123,8 @@
@ cdecl -arch=win32 ?_Mutex_dtor at _Mutex@std@@CAXPAV12@@Z(ptr) msvcp90.?_Mutex_dtor at _Mutex@std@@CAXPAV12@@Z
@ cdecl -arch=win64 ?_Mutex_dtor at _Mutex@std@@CAXPEAV12@@Z(ptr) msvcp90.?_Mutex_dtor at _Mutex@std@@CAXPEAV12@@Z
@ stub ?_Nomemory at std@@YAXXZ
-@ stub -arch=win32 ?_Orphan_all at _Container_base0@std@@QAEXXZ
-@ stub -arch=win64 ?_Orphan_all at _Container_base0@std@@QEAAXXZ
+@ thiscall -arch=win32 ?_Orphan_all at _Container_base0@std@@QAEXXZ(ptr) Container_base0_Orphan_all
+@ cdecl -arch=win64 ?_Orphan_all at _Container_base0@std@@QEAAXXZ(ptr) Container_base0_Orphan_all
@ stub -arch=win32 ?_Orphan_all at _Container_base12@std@@QAEXXZ
@ stub -arch=win64 ?_Orphan_all at _Container_base12@std@@QEAAXXZ
@ thiscall -arch=win32 ?_Osfx@?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEXXZ(ptr) msvcp90.?_Osfx@?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEXXZ
@@ -1202,8 +1202,8 @@
@ stub -arch=win64 ?_Segment_index_of at _Concurrent_vector_base_v4@details at Concurrency@@KA_K_K at Z
@ cdecl -arch=win32 ?_Setgloballocale at locale@std@@CAXPAX at Z(ptr) msvcp90.?_Setgloballocale at locale@std@@CAXPAX at Z
@ cdecl -arch=win64 ?_Setgloballocale at locale@std@@CAXPEAX at Z(ptr) msvcp90.?_Setgloballocale at locale@std@@CAXPEAX at Z
-@ stub -arch=win32 ?_Swap_all at _Container_base0@std@@QAEXAAU12@@Z
-@ stub -arch=win64 ?_Swap_all at _Container_base0@std@@QEAAXAEAU12@@Z
+@ thiscall -arch=win32 ?_Swap_all at _Container_base0@std@@QAEXAAU12@@Z(ptr ptr) Container_base0_Swap_all
+@ cdecl -arch=win64 ?_Swap_all at _Container_base0@std@@QEAAXAEAU12@@Z(ptr ptr) Container_base0_Swap_all
@ stub -arch=win32 ?_Swap_all at _Container_base12@std@@QAEXAAU12@@Z
@ stub -arch=win64 ?_Swap_all at _Container_base12@std@@QEAAXAEAU12@@Z
@ extern ?_Sync at ios_base@std@@0_NA msvcp90.?_Sync at ios_base@std@@0_NA
More information about the wine-cvs
mailing list