From c5530b276daf619f22fc3e1b0542efecbe30b47b Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Wed, 5 Jun 2019 18:56:09 +0200 Subject: [PATCH] msvcp: Add _Init_locks class implementation. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46982 Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- dlls/msvcp100/msvcp100.spec | 16 ++++---- dlls/msvcp110/msvcp110.spec | 20 +++++----- dlls/msvcp120/msvcp120.spec | 20 +++++----- dlls/msvcp120_app/msvcp120_app.spec | 20 +++++----- dlls/msvcp140/msvcp140.spec | 20 +++++----- dlls/msvcp60/main.c | 4 +- dlls/msvcp60/msvcp.h | 8 ++++ dlls/msvcp80/msvcp80.spec | 16 ++++---- dlls/msvcp90/misc.c | 61 +++++++++++++++++++++++++---- dlls/msvcp90/msvcp90.h | 10 ++++- dlls/msvcp90/msvcp90.spec | 16 ++++---- dlls/msvcp90/msvcp_main.c | 4 +- 12 files changed, 137 insertions(+), 78 deletions(-) diff --git a/dlls/msvcp100/msvcp100.spec b/dlls/msvcp100/msvcp100.spec index 4b8d492421d..4ca8d5b2778 100644 --- a/dlls/msvcp100/msvcp100.spec +++ b/dlls/msvcp100/msvcp100.spec @@ -185,8 +185,8 @@ @ cdecl -arch=arm ??0_Container_base12@std@@QAA@XZ(ptr) _Container_base12_ctor @ thiscall -arch=i386 ??0_Container_base12@std@@QAE@XZ(ptr) _Container_base12_ctor @ cdecl -arch=win64 ??0_Container_base12@std@@QEAA@XZ(ptr) _Container_base12_ctor -@ stub -arch=win32 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ thiscall -arch=win32 ??0_Init_locks@std@@QAE@XZ(ptr) _Init_locks_ctor +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_ctor @ thiscall -arch=win32 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ cdecl -arch=win64 ??0_Locimp@locale@std@@AEAA@AEBV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ thiscall -arch=win32 ??0_Locimp@locale@std@@AAE@_N@Z(ptr long) locale__Locimp_ctor_transparent @@ -317,8 +317,8 @@ @ cdecl -arch=arm ??1_Container_base12@std@@QAA@XZ(ptr) _Container_base12_dtor @ thiscall -arch=i386 ??1_Container_base12@std@@QAE@XZ(ptr) _Container_base12_dtor @ cdecl -arch=win64 ??1_Container_base12@std@@QEAA@XZ(ptr) _Container_base12_dtor -@ stub -arch=win32 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ thiscall -arch=win32 ??1_Init_locks@std@@QAE@XZ(ptr) _Init_locks_dtor +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_dtor @ thiscall -arch=win32 ??1_Locimp@locale@std@@MAE@XZ(ptr) locale__Locimp_dtor @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor @ thiscall -arch=win32 ??1_Locinfo@std@@QAE@XZ(ptr) _Locinfo_dtor @@ -1025,10 +1025,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_ctor @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) ios_base_Init__Init_dtor @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_dtor -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_dtor +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_dtor @ thiscall -arch=win32 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign @ cdecl -arch=win64 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign @ thiscall -arch=win32 ?_Internal_capacity@_Concurrent_vector_base_v4@details@Concurrency@@IBEIXZ(ptr) _Concurrent_vector_base_v4__Internal_capacity diff --git a/dlls/msvcp110/msvcp110.spec b/dlls/msvcp110/msvcp110.spec index 27c73be65e9..00c3707ea4e 100644 --- a/dlls/msvcp110/msvcp110.spec +++ b/dlls/msvcp110/msvcp110.spec @@ -289,9 +289,9 @@ @ stub -arch=arm ??0_Facet_base@std@@QAA@XZ @ stub -arch=i386 ??0_Facet_base@std@@QAE@XZ @ stub -arch=win64 ??0_Facet_base@std@@QEAA@XZ -@ stub -arch=arm ??0_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??0_Init_locks@std@@QAA@XZ(ptr) _Init_locks_ctor +@ thiscall -arch=i386 ??0_Init_locks@std@@QAE@XZ(ptr) _Init_locks_ctor +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_ctor @ cdecl -arch=arm ??0_Locimp@locale@std@@AAA@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ cdecl -arch=win64 ??0_Locimp@locale@std@@AEAA@AEBV012@@Z(ptr ptr) locale__Locimp_copy_ctor @@ -484,9 +484,9 @@ @ stub -arch=arm ??1_Facet_base@std@@UAA@XZ @ stub -arch=i386 ??1_Facet_base@std@@UAE@XZ @ stub -arch=win64 ??1_Facet_base@std@@UEAA@XZ -@ stub -arch=arm ??1_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??1_Init_locks@std@@QAA@XZ(ptr) _Init_locks_dtor +@ thiscall -arch=i386 ??1_Init_locks@std@@QAE@XZ(ptr) _Init_locks_dtor +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_dtor @ cdecl -arch=arm ??1_Locimp@locale@std@@MAA@XZ(ptr) locale__Locimp_dtor @ thiscall -arch=i386 ??1_Locimp@locale@std@@MAE@XZ(ptr) locale__Locimp_dtor @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor @@ -1478,10 +1478,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_ctor @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) ios_base_Init__Init_dtor @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_dtor -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_dtor +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_dtor @ cdecl -arch=arm ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign @ thiscall -arch=i386 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign @ cdecl -arch=win64 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign diff --git a/dlls/msvcp120/msvcp120.spec b/dlls/msvcp120/msvcp120.spec index 019f29c2c5b..e131d41ecc9 100644 --- a/dlls/msvcp120/msvcp120.spec +++ b/dlls/msvcp120/msvcp120.spec @@ -289,9 +289,9 @@ @ stub -arch=arm ??0_Facet_base@std@@QAA@XZ @ stub -arch=i386 ??0_Facet_base@std@@QAE@XZ @ stub -arch=win64 ??0_Facet_base@std@@QEAA@XZ -@ stub -arch=arm ??0_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??0_Init_locks@std@@QAA@XZ(ptr) _Init_locks_ctor +@ thiscall -arch=i386 ??0_Init_locks@std@@QAE@XZ(ptr) _Init_locks_ctor +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_ctor @ cdecl -arch=arm ??0_Locimp@locale@std@@AAA@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ cdecl -arch=win64 ??0_Locimp@locale@std@@AEAA@AEBV012@@Z(ptr ptr) locale__Locimp_copy_ctor @@ -484,9 +484,9 @@ @ stub -arch=arm ??1_Facet_base@std@@UAA@XZ @ stub -arch=i386 ??1_Facet_base@std@@UAE@XZ @ stub -arch=win64 ??1_Facet_base@std@@UEAA@XZ -@ stub -arch=arm ??1_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??1_Init_locks@std@@QAA@XZ(ptr) _Init_locks_dtor +@ thiscall -arch=i386 ??1_Init_locks@std@@QAE@XZ(ptr) _Init_locks_dtor +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_dtor @ cdecl -arch=arm ??1_Locimp@locale@std@@MAA@XZ(ptr) locale__Locimp_dtor @ thiscall -arch=i386 ??1_Locimp@locale@std@@MAE@XZ(ptr) locale__Locimp_dtor @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor @@ -1439,10 +1439,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_ctor @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) ios_base_Init__Init_dtor @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_dtor -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_dtor +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_dtor @ cdecl -arch=arm ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign @ thiscall -arch=i386 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign @ cdecl -arch=win64 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z(ptr ptr long ptr ptr ptr) _Concurrent_vector_base_v4__Internal_assign diff --git a/dlls/msvcp120_app/msvcp120_app.spec b/dlls/msvcp120_app/msvcp120_app.spec index 99c7a57ee0f..a76149071cf 100644 --- a/dlls/msvcp120_app/msvcp120_app.spec +++ b/dlls/msvcp120_app/msvcp120_app.spec @@ -289,9 +289,9 @@ @ stub -arch=arm ??0_Facet_base@std@@QAA@XZ @ stub -arch=i386 ??0_Facet_base@std@@QAE@XZ @ stub -arch=win64 ??0_Facet_base@std@@QEAA@XZ -@ stub -arch=arm ??0_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??0_Init_locks@std@@QAA@XZ(ptr) msvcp120.??0_Init_locks@std@@QAA@XZ +@ thiscall -arch=i386 ??0_Init_locks@std@@QAE@XZ(ptr) msvcp120.??0_Init_locks@std@@QAE@XZ +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) msvcp120.??0_Init_locks@std@@QEAA@XZ @ cdecl -arch=arm ??0_Locimp@locale@std@@AAA@ABV012@@Z(ptr ptr) msvcp120.??0_Locimp@locale@std@@AAA@ABV012@@Z @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) msvcp120.??0_Locimp@locale@std@@AAE@ABV012@@Z @ cdecl -arch=win64 ??0_Locimp@locale@std@@AEAA@AEBV012@@Z(ptr ptr) msvcp120.??0_Locimp@locale@std@@AEAA@AEBV012@@Z @@ -484,9 +484,9 @@ @ stub -arch=arm ??1_Facet_base@std@@UAA@XZ @ stub -arch=i386 ??1_Facet_base@std@@UAE@XZ @ stub -arch=win64 ??1_Facet_base@std@@UEAA@XZ -@ stub -arch=arm ??1_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??1_Init_locks@std@@QAA@XZ(ptr) msvcp120.??1_Init_locks@std@@QAA@XZ +@ thiscall -arch=i386 ??1_Init_locks@std@@QAE@XZ(ptr) msvcp120.??1_Init_locks@std@@QAE@XZ +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) msvcp120.??1_Init_locks@std@@QEAA@XZ @ cdecl -arch=arm ??1_Locimp@locale@std@@MAA@XZ(ptr) msvcp120.??1_Locimp@locale@std@@MAA@XZ @ thiscall -arch=i386 ??1_Locimp@locale@std@@MAE@XZ(ptr) msvcp120.??1_Locimp@locale@std@@MAE@XZ @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) msvcp120.??1_Locimp@locale@std@@MEAA@XZ @@ -1439,10 +1439,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) msvcp120.?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) msvcp120.?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) msvcp120.?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) msvcp120.?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) msvcp120.?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) msvcp120.?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) msvcp120.?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z @ cdecl -arch=arm ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) msvcp120.?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAAXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z @ thiscall -arch=i386 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z(ptr ptr long ptr ptr ptr) msvcp120.?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IAEXABV123@IP6AXPAXI@ZP6AX1PBXI@Z4@Z @ cdecl -arch=win64 ?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z(ptr ptr long ptr ptr ptr) msvcp120.?_Internal_assign@_Concurrent_vector_base_v4@details@Concurrency@@IEAAXAEBV123@_KP6AXPEAX1@ZP6AX2PEBX1@Z5@Z diff --git a/dlls/msvcp140/msvcp140.spec b/dlls/msvcp140/msvcp140.spec index 371cf10855e..a5b2bd40b26 100644 --- a/dlls/msvcp140/msvcp140.spec +++ b/dlls/msvcp140/msvcp140.spec @@ -310,9 +310,9 @@ @ stub -arch=i386 ??0_Facet_base@std@@QAE@XZ @ stub -arch=win64 ??0_Facet_base@std@@QEAA@AEBV01@@Z @ stub -arch=win64 ??0_Facet_base@std@@QEAA@XZ -@ stub -arch=arm ??0_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??0_Init_locks@std@@QAA@XZ(ptr) _Init_locks_ctor +@ thiscall -arch=i386 ??0_Init_locks@std@@QAE@XZ(ptr) _Init_locks_ctor +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_ctor @ cdecl -arch=arm ??0_Locimp@locale@std@@AAA@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ cdecl -arch=arm ??0_Locimp@locale@std@@AAA@_N@Z(ptr long) locale__Locimp_ctor_transparent @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @@ -484,9 +484,9 @@ @ stub -arch=arm ??1_Facet_base@std@@UAA@XZ @ stub -arch=i386 ??1_Facet_base@std@@UAE@XZ @ stub -arch=win64 ??1_Facet_base@std@@UEAA@XZ -@ stub -arch=arm ??1_Init_locks@std@@QAA@XZ -@ stub -arch=i386 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ cdecl -arch=arm ??1_Init_locks@std@@QAA@XZ(ptr) _Init_locks_dtor +@ thiscall -arch=i386 ??1_Init_locks@std@@QAE@XZ(ptr) _Init_locks_dtor +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_dtor @ cdecl -arch=arm ??1_Locimp@locale@std@@MAA@XZ(ptr) locale__Locimp_dtor @ thiscall -arch=i386 ??1_Locimp@locale@std@@MAE@XZ(ptr) locale__Locimp_dtor @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor @@ -1421,10 +1421,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_ctor @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) ios_base_Init__Init_dtor @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_dtor -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_dtor +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_dtor @ cdecl -arch=win32 ?_Ios_base_dtor@ios_base@std@@CAXPAV12@@Z(ptr) ios_base_Ios_base_dtor @ cdecl -arch=win64 ?_Ios_base_dtor@ios_base@std@@CAXPEAV12@@Z(ptr) ios_base_Ios_base_dtor @ cdecl -arch=arm ?_Ipfx@?$basic_istream@DU?$char_traits@D@std@@@std@@QAA_N_N@Z(ptr long) basic_istream_char__Ipfx diff --git a/dlls/msvcp60/main.c b/dlls/msvcp60/main.c index fbfd38c0993..450fd80133e 100644 --- a/dlls/msvcp60/main.c +++ b/dlls/msvcp60/main.c @@ -90,7 +90,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return FALSE; /* prefer native version */ case DLL_PROCESS_ATTACH: init_cxx_funcs(); - init_lockit(); + _Init_locks__Init_locks_ctor(NULL); init_exception(hinstDLL); init_locale(hinstDLL); init_io(hinstDLL); @@ -99,7 +99,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) if (lpvReserved) break; free_io(); free_locale(); - free_lockit(); + _Init_locks__Init_locks_dtor(NULL); break; } diff --git a/dlls/msvcp60/msvcp.h b/dlls/msvcp60/msvcp.h index 570d03ca6d7..81b74ef150d 100644 --- a/dlls/msvcp60/msvcp.h +++ b/dlls/msvcp60/msvcp.h @@ -188,6 +188,14 @@ typedef struct { extern locale_id codecvt_char_id; extern locale_id codecvt_short_id; +/* class _Init_locks */ +typedef struct { + char empty_struct; +} _Init_locks; + +void __cdecl _Init_locks__Init_locks_ctor(_Init_locks*); +void __cdecl _Init_locks__Init_locks_dtor(_Init_locks*); + /* class _Lockit */ typedef struct { char empty_struct; diff --git a/dlls/msvcp80/msvcp80.spec b/dlls/msvcp80/msvcp80.spec index 81aa3bc8cab..fa4d6eaf405 100644 --- a/dlls/msvcp80/msvcp80.spec +++ b/dlls/msvcp80/msvcp80.spec @@ -1066,8 +1066,8 @@ @ cdecl -arch=win64 ??0?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@QEAA@_K@Z(ptr long) time_put_wchar_ctor_refs @ thiscall -arch=i386 ??0Init@ios_base@std@@QAE@XZ(ptr) ios_base_Init_ctor @ cdecl -arch=win64 ??0Init@ios_base@std@@QEAA@XZ(ptr) ios_base_Init_ctor -@ stub -arch=win32 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ thiscall -arch=win32 ??0_Init_locks@std@@QAE@XZ(ptr) _Init_locks_ctor +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_ctor @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ cdecl -arch=win64 ??0_Locimp@locale@std@@AEAA@AEBV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@_N@Z(ptr long) locale__Locimp_ctor_transparent @@ -1308,8 +1308,8 @@ @ cdecl -arch=win64 ??1?$time_put@_WV?$ostreambuf_iterator@_WU?$char_traits@_W@std@@@std@@@std@@MEAA@XZ(ptr) time_put_wchar_dtor @ thiscall -arch=i386 ??1Init@ios_base@std@@QAE@XZ(ptr) ios_base_Init_dtor @ cdecl -arch=win64 ??1Init@ios_base@std@@QEAA@XZ(ptr) ios_base_Init_dtor -@ stub -arch=win32 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ thiscall -arch=win32 ??1_Init_locks@std@@QAE@XZ(ptr) _Init_locks_dtor +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_dtor @ thiscall -arch=i386 ??1_Locimp@locale@std@@MAE@XZ(ptr) locale__Locimp_dtor @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor @ thiscall -arch=i386 ??1_Locinfo@std@@QAE@XZ(ptr) _Locinfo_dtor @@ -2524,10 +2524,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_ctor @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) ios_base_Init__Init_dtor @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_dtor -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_dtor +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_dtor @ thiscall -arch=win32 ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z(ptr ptr) basic_filebuf_char__Initcvt_cvt @ cdecl -arch=win64 ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z(ptr ptr) basic_filebuf_char__Initcvt_cvt @ thiscall -arch=win32 ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z(ptr ptr) basic_filebuf_wchar__Initcvt_cvt diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 34fe66544a1..fba1de83eb1 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -330,24 +330,69 @@ void CDECL mutex_mutex_dtor(mutex *m) static CRITICAL_SECTION lockit_cs[_MAX_LOCK]; -void init_lockit(void) { +static LONG init_locks; +static CRITICAL_SECTION init_locks_cs; +static CRITICAL_SECTION_DEBUG init_locks_cs_debug = +{ + 0, 0, &init_locks_cs, + { &init_locks_cs_debug.ProcessLocksList, &init_locks_cs_debug.ProcessLocksList }, + 0, 0, { (DWORD_PTR)(__FILE__ ": init_locks_cs") } +}; +static CRITICAL_SECTION init_locks_cs = { &init_locks_cs_debug, -1, 0, 0, 0, 0 }; + +/* ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z */ +/* ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z */ +void __cdecl _Init_locks__Init_locks_ctor(_Init_locks *this) +{ int i; - for(i=0; i<_MAX_LOCK; i++) + EnterCriticalSection(&init_locks_cs); + if (!init_locks) { - InitializeCriticalSection(&lockit_cs[i]); - lockit_cs[i].DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": _Lockit critical section"); + for(i=0; i<_MAX_LOCK; i++) + { + InitializeCriticalSection(&lockit_cs[i]); + lockit_cs[i].DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": _Lockit critical section"); + } } + init_locks++; + LeaveCriticalSection(&init_locks_cs); } -void free_lockit(void) { +/* ??0_Init_locks@std@@QAE@XZ */ +/* ??0_Init_locks@std@@QEAA@XZ */ +DEFINE_THISCALL_WRAPPER(_Init_locks_ctor, 4) +_Init_locks* __thiscall _Init_locks_ctor(_Init_locks *this) +{ + _Init_locks__Init_locks_ctor(this); + return this; +} + +/* ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z */ +/* ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z */ +void __cdecl _Init_locks__Init_locks_dtor(_Init_locks *this) +{ int i; - for(i=0; i<_MAX_LOCK; i++) + EnterCriticalSection(&init_locks_cs); + init_locks--; + if (!init_locks) { - lockit_cs[i].DebugInfo->Spare[0] = 0; - DeleteCriticalSection(&lockit_cs[i]); + for(i=0; i<_MAX_LOCK; i++) + { + lockit_cs[i].DebugInfo->Spare[0] = 0; + DeleteCriticalSection(&lockit_cs[i]); + } } + LeaveCriticalSection(&init_locks_cs); +} + +/* ??1_Init_locks@std@@QAE@XZ */ +/* ??1_Init_locks@std@@QEAA@XZ */ +DEFINE_THISCALL_WRAPPER(_Init_locks_dtor, 4) +void __thiscall _Init_locks_dtor(_Init_locks *this) +{ + _Init_locks__Init_locks_dtor(this); } #if _MSVCP_VER >= 70 diff --git a/dlls/msvcp90/msvcp90.h b/dlls/msvcp90/msvcp90.h index 2e3d071e0ef..497ca126e47 100644 --- a/dlls/msvcp90/msvcp90.h +++ b/dlls/msvcp90/msvcp90.h @@ -297,6 +297,14 @@ ctype_char* ctype_char_use_facet(const locale*); ctype_wchar* ctype_wchar_use_facet(const locale*); ctype_wchar* ctype_short_use_facet(const locale*); +/* class _Init_locks */ +typedef struct { + char empty_struct; +} _Init_locks; + +void __cdecl _Init_locks__Init_locks_ctor(_Init_locks*); +void __cdecl _Init_locks__Init_locks_dtor(_Init_locks*); + /* class _Lockit */ typedef struct { #if _MSVCP_VER >= 70 @@ -312,8 +320,6 @@ typedef struct { #define _LOCK_DEBUG 3 #define _MAX_LOCK 4 -void init_lockit(void); -void free_lockit(void); _Lockit* __thiscall _Lockit_ctor_locktype(_Lockit*, int); void __thiscall _Lockit_dtor(_Lockit*); diff --git a/dlls/msvcp90/msvcp90.spec b/dlls/msvcp90/msvcp90.spec index 50cafed8dfe..6a5a9a20a4e 100644 --- a/dlls/msvcp90/msvcp90.spec +++ b/dlls/msvcp90/msvcp90.spec @@ -1130,8 +1130,8 @@ @ cdecl -arch=arm ??0Init@ios_base@std@@QAA@XZ(ptr) ios_base_Init_ctor @ thiscall -arch=i386 ??0Init@ios_base@std@@QAE@XZ(ptr) ios_base_Init_ctor @ cdecl -arch=win64 ??0Init@ios_base@std@@QEAA@XZ(ptr) ios_base_Init_ctor -@ stub -arch=win32 ??0_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??0_Init_locks@std@@QEAA@XZ +@ thiscall -arch=win32 ??0_Init_locks@std@@QAE@XZ(ptr) _Init_locks_ctor +@ cdecl -arch=win64 ??0_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_ctor @ cdecl -arch=arm ??0_Locimp@locale@std@@AAA@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ thiscall -arch=i386 ??0_Locimp@locale@std@@AAE@ABV012@@Z(ptr ptr) locale__Locimp_copy_ctor @ cdecl -arch=win64 ??0_Locimp@locale@std@@AEAA@AEBV012@@Z(ptr ptr) locale__Locimp_copy_ctor @@ -1421,8 +1421,8 @@ @ cdecl -arch=arm ??1Init@ios_base@std@@QAA@XZ(ptr) ios_base_Init_dtor @ thiscall -arch=i386 ??1Init@ios_base@std@@QAE@XZ(ptr) ios_base_Init_dtor @ cdecl -arch=win64 ??1Init@ios_base@std@@QEAA@XZ(ptr) ios_base_Init_dtor -@ stub -arch=win32 ??1_Init_locks@std@@QAE@XZ -@ stub -arch=win64 ??1_Init_locks@std@@QEAA@XZ +@ thiscall -arch=win32 ??1_Init_locks@std@@QAE@XZ(ptr) _Init_locks_dtor +@ cdecl -arch=win64 ??1_Init_locks@std@@QEAA@XZ(ptr) _Init_locks_dtor @ cdecl -arch=arm ??1_Locimp@locale@std@@MAA@XZ(ptr) locale__Locimp_dtor @ thiscall -arch=i386 ??1_Locimp@locale@std@@MAE@XZ(ptr) locale__Locimp_dtor @ cdecl -arch=win64 ??1_Locimp@locale@std@@MEAA@XZ(ptr) locale__Locimp_dtor @@ -2846,10 +2846,10 @@ @ cdecl -arch=win64 ?_Init_ctor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_ctor @ cdecl -arch=win32 ?_Init_dtor@Init@ios_base@std@@CAXPAV123@@Z(ptr) ios_base_Init__Init_dtor @ cdecl -arch=win64 ?_Init_dtor@Init@ios_base@std@@CAXPEAV123@@Z(ptr) ios_base_Init__Init_dtor -@ stub -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z -@ stub -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z -@ stub -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z +@ cdecl -arch=win32 ?_Init_locks_ctor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win64 ?_Init_locks_ctor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_ctor +@ cdecl -arch=win32 ?_Init_locks_dtor@_Init_locks@std@@CAXPAV12@@Z(ptr) _Init_locks__Init_locks_dtor +@ cdecl -arch=win64 ?_Init_locks_dtor@_Init_locks@std@@CAXPEAV12@@Z(ptr) _Init_locks__Init_locks_dtor @ thiscall -arch=win32 ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IAEXPAV?$codecvt@DDH@2@@Z(ptr ptr) basic_filebuf_char__Initcvt_cvt @ cdecl -arch=win64 ?_Initcvt@?$basic_filebuf@DU?$char_traits@D@std@@@std@@IEAAXPEAV?$codecvt@DDH@2@@Z(ptr ptr) basic_filebuf_char__Initcvt_cvt @ thiscall -arch=win32 ?_Initcvt@?$basic_filebuf@GU?$char_traits@G@std@@@std@@IAEXPAV?$codecvt@GDH@2@@Z(ptr ptr) basic_filebuf_wchar__Initcvt_cvt diff --git a/dlls/msvcp90/msvcp_main.c b/dlls/msvcp90/msvcp_main.c index 52f25a9773a..6166591d0cb 100644 --- a/dlls/msvcp90/msvcp_main.c +++ b/dlls/msvcp90/msvcp_main.c @@ -208,7 +208,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { case DLL_PROCESS_ATTACH: init_cxx_funcs(); - init_lockit(); + _Init_locks__Init_locks_ctor(NULL); init_exception(hinstDLL); init_locale(hinstDLL); init_io(hinstDLL); @@ -220,7 +220,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) if (lpvReserved) break; free_io(); free_locale(); - free_lockit(); + _Init_locks__Init_locks_dtor(NULL); #if _MSVCP_VER >= 100 free_misc(); #endif