[PATCH] programs: Fix broken compilation on win64
mlankhorst
mlankhorst at dhcp-172-29-61-127.smo.corp.google.com
Fri Nov 21 15:24:26 CST 2008
---
programs/rpcss/epmp.c | 9 ++++++++-
programs/rpcss/irotp.c | 7 +++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/programs/rpcss/epmp.c b/programs/rpcss/epmp.c
index d7712b9..f3b2124 100644
--- a/programs/rpcss/epmp.c
+++ b/programs/rpcss/epmp.c
@@ -39,12 +39,15 @@ struct registered_ept_entry
static struct list registered_ept_entry_list = LIST_INIT(registered_ept_entry_list);
+static const char namedesc[] = (__FILE__ ": csEpm");
+
static CRITICAL_SECTION csEpm;
static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &csEpm,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": csEpm") }
+ /* Setting the spare sections at first lock */
+ 0, 0, { 0, 0}
};
static CRITICAL_SECTION csEpm = { &critsect_debug, -1, 0, 0, 0, 0 };
@@ -103,6 +106,8 @@ void ept_insert(handle_t h,
*status = RPC_S_OK;
EnterCriticalSection(&csEpm);
+ if (!critsect_debug.Spare[0])
+ *(DWORD_PTR *)&critsect_debug.Spare[0] = (DWORD_PTR)&namedesc[0];
for (i = 0; i < num_ents; i++)
{
@@ -225,6 +230,8 @@ void ept_map(handle_t h,
}
EnterCriticalSection(&csEpm);
+ if (!critsect_debug.Spare[0])
+ *(DWORD_PTR *)&critsect_debug.Spare[0] = (DWORD_PTR)&namedesc[0];
LIST_FOR_EACH_ENTRY(entry, ®istered_ept_entry_list, struct registered_ept_entry, entry)
{
diff --git a/programs/rpcss/irotp.c b/programs/rpcss/irotp.c
index 6f32205..cc36e87 100644
--- a/programs/rpcss/irotp.c
+++ b/programs/rpcss/irotp.c
@@ -46,15 +46,16 @@ struct rot_entry
static struct list RunningObjectTable = LIST_INIT(RunningObjectTable);
+static const char namedesc[] = (__FILE__ ": csRunningObjectTable");
+
static CRITICAL_SECTION csRunningObjectTable;
static CRITICAL_SECTION_DEBUG critsect_debug =
{
0, 0, &csRunningObjectTable,
{ &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },
- 0, 0, { (DWORD_PTR)(__FILE__ ": csRunningObjectTable") }
+ 0, 0, { 0, 0 }
};
static CRITICAL_SECTION csRunningObjectTable = { &critsect_debug, -1, 0, 0, 0, 0 };
-
static LONG last_cookie = 1;
static inline void rot_entry_release(struct rot_entry *rot_entry)
@@ -123,6 +124,8 @@ HRESULT IrotRegister(
memcpy(&rot_entry->moniker_data->abData, data->abData, data->ulCntData);
EnterCriticalSection(&csRunningObjectTable);
+ if (!critsect_debug.Spare[0])
+ *(DWORD_PTR *)&critsect_debug.Spare[0] = (DWORD_PTR)&namedesc[0];
hr = S_OK;
--
1.5.6.5
--------------040605010902050801080003--
More information about the wine-patches
mailing list