[PATCH 2/4] webservices: Don't set the critical section name in the Windows build.

Hans Leidekker hans at codeweavers.com
Wed Oct 17 06:42:35 CDT 2018


Signed-off-by: Hans Leidekker <hans at codeweavers.com>
---
 dlls/webservices/channel.c  | 16 ++++++++--------
 dlls/webservices/error.c    |  4 ++++
 dlls/webservices/heap.c     |  4 ++++
 dlls/webservices/listener.c |  4 ++++
 dlls/webservices/msg.c      |  4 ++++
 dlls/webservices/proxy.c    |  4 ++++
 dlls/webservices/reader.c   |  5 +++++
 dlls/webservices/writer.c   |  4 ++++
 8 files changed, 37 insertions(+), 8 deletions(-)

diff --git a/dlls/webservices/channel.c b/dlls/webservices/channel.c
index 0cd8b910e8..5d3ca347da 100644
--- a/dlls/webservices/channel.c
+++ b/dlls/webservices/channel.c
@@ -251,13 +251,13 @@ static struct channel *alloc_channel(void)
 
     ret->magic      = CHANNEL_MAGIC;
     InitializeCriticalSection( &ret->cs );
-    ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": channel.cs");
-
     InitializeCriticalSection( &ret->send_q.cs );
-    ret->send_q.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": channel.send_q.cs");
-
     InitializeCriticalSection( &ret->recv_q.cs );
+#ifndef __MINGW32__
+    ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": channel.cs");
+    ret->send_q.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": channel.send_q.cs");
     ret->recv_q.cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": channel.recv_q.cs");
+#endif
 
     prop_init( channel_props, count, ret->prop, &ret[1] );
     ret->prop_count = count;
@@ -342,13 +342,13 @@ static void free_channel( struct channel *channel )
 
     heap_free( channel->read_buf );
 
+#ifndef __MINGW32__
     channel->send_q.cs.DebugInfo->Spare[0] = 0;
-    DeleteCriticalSection( &channel->send_q.cs );
-
     channel->recv_q.cs.DebugInfo->Spare[0] = 0;
-    DeleteCriticalSection( &channel->recv_q.cs );
-
     channel->cs.DebugInfo->Spare[0] = 0;
+#endif
+    DeleteCriticalSection( &channel->send_q.cs );
+    DeleteCriticalSection( &channel->recv_q.cs );
     DeleteCriticalSection( &channel->cs );
     heap_free( channel );
 }
diff --git a/dlls/webservices/error.c b/dlls/webservices/error.c
index 780040e51e..970c12e1e3 100644
--- a/dlls/webservices/error.c
+++ b/dlls/webservices/error.c
@@ -57,7 +57,9 @@ static struct error *alloc_error(void)
 
     ret->magic      = ERROR_MAGIC;
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": error.cs");
+#endif
 
     prop_init( error_props, count, ret->prop, &ret[1] );
     ret->prop_count = count;
@@ -66,7 +68,9 @@ static struct error *alloc_error(void)
 
 static void free_error( struct error *error )
 {
+#ifndef __MINGW32__
     error->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &error->cs );
     heap_free( error );
 }
diff --git a/dlls/webservices/heap.c b/dlls/webservices/heap.c
index 93e647abc6..93c8c4499a 100644
--- a/dlls/webservices/heap.c
+++ b/dlls/webservices/heap.c
@@ -185,7 +185,9 @@ static struct heap *alloc_heap(void)
 
     ret->magic      = HEAP_MAGIC;
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": heap.cs");
+#endif
 
     prop_init( heap_props, count, ret->prop, &ret[1] );
     ret->prop_count = count;
@@ -245,7 +247,9 @@ void WINAPI WsFreeHeap( WS_HEAP *handle )
 
     LeaveCriticalSection( &heap->cs );
 
+#ifndef __MINGW32__
     heap->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &heap->cs );
     heap_free( heap );
 }
diff --git a/dlls/webservices/listener.c b/dlls/webservices/listener.c
index 0189059aa7..2e8286e144 100644
--- a/dlls/webservices/listener.c
+++ b/dlls/webservices/listener.c
@@ -139,7 +139,9 @@ static struct listener *alloc_listener(void)
         return NULL;
     }
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": listener.cs");
+#endif
 
     prop_init( listener_props, count, ret->prop, &ret[1] );
     ret->prop_count = count;
@@ -175,7 +177,9 @@ static void free_listener( struct listener *listener )
     CloseHandle( listener->wait );
     CloseHandle( listener->cancel );
 
+#ifndef __MINGW32__
     listener->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &listener->cs );
     heap_free( listener );
 }
diff --git a/dlls/webservices/msg.c b/dlls/webservices/msg.c
index 07063460be..48b4ec561d 100644
--- a/dlls/webservices/msg.c
+++ b/dlls/webservices/msg.c
@@ -106,7 +106,9 @@ static struct msg *alloc_msg(void)
     ret->header_size = HEADER_ARRAY_SIZE;
 
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": msg.cs");
+#endif
 
     prop_init( msg_props, count, ret->prop, &ret[1] );
     ret->prop_count  = count;
@@ -162,7 +164,9 @@ static void free_msg( struct msg *msg )
     WsFreeHeap( msg->heap );
     heap_free( msg->header );
 
+#ifndef __MINGW32__
     msg->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &msg->cs );
     heap_free( msg );
 }
diff --git a/dlls/webservices/proxy.c b/dlls/webservices/proxy.c
index 5122892704..92406f15df 100644
--- a/dlls/webservices/proxy.c
+++ b/dlls/webservices/proxy.c
@@ -63,7 +63,9 @@ static struct proxy *alloc_proxy(void)
 
     ret->magic      = PROXY_MAGIC;
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": proxy.cs");
+#endif
 
     prop_init( proxy_props, count, ret->prop, &ret[1] );
     ret->prop_count = count;
@@ -81,7 +83,9 @@ static void free_proxy( struct proxy *proxy )
     reset_proxy( proxy );
     WsFreeChannel( proxy->channel );
 
+#ifndef __MINGW32__
     proxy->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &proxy->cs );
     heap_free( proxy );
 }
diff --git a/dlls/webservices/reader.c b/dlls/webservices/reader.c
index 296043fa25..7288c4b966 100644
--- a/dlls/webservices/reader.c
+++ b/dlls/webservices/reader.c
@@ -418,7 +418,9 @@ static struct reader *alloc_reader(void)
 
     ret->magic       = READER_MAGIC;
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": reader.cs");
+#endif
 
     prop_init( reader_props, count, ret->prop, &ret[1] );
     ret->prop_count  = count;
@@ -513,7 +515,10 @@ static void free_reader( struct reader *reader )
     destroy_nodes( reader->root );
     clear_prefixes( reader->prefixes, reader->nb_prefixes );
     heap_free( reader->prefixes );
+
+#ifndef __MINGW32__
     reader->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &reader->cs );
     heap_free( reader );
 }
diff --git a/dlls/webservices/writer.c b/dlls/webservices/writer.c
index ef8f9193a0..7631f4ebe8 100644
--- a/dlls/webservices/writer.c
+++ b/dlls/webservices/writer.c
@@ -107,7 +107,9 @@ static struct writer *alloc_writer(void)
 
     ret->magic      = WRITER_MAGIC;
     InitializeCriticalSection( &ret->cs );
+#ifndef __MINGW32__
     ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": writer.cs");
+#endif
 
     prop_init( writer_props, count, ret->prop, &ret[1] );
     ret->prop_count = count;
@@ -120,7 +122,9 @@ static void free_writer( struct writer *writer )
     free_xml_string( writer->current_ns );
     WsFreeHeap( writer->output_heap );
 
+#ifndef __MINGW32__
     writer->cs.DebugInfo->Spare[0] = 0;
+#endif
     DeleteCriticalSection( &writer->cs );
     heap_free( writer );
 }
-- 
2.11.0




More information about the wine-devel mailing list