[Mono-bugs] [Bug 52546][Maj] New - Compile libgc in mono cvs tree failed
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 24 Dec 2003 14:23:53 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by liyul@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52546
--- shadow/52546 2003-12-24 14:23:52.000000000 -0500
+++ shadow/52546.tmp.23452 2003-12-24 14:23:53.000000000 -0500
@@ -0,0 +1,120 @@
+Bug#: 52546
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: liyul@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Compile libgc in mono cvs tree failed
+
+Should merge fix in
+
+http://gcc.gnu.org/ml/gcc-patches/2003-07/msg02692.html
+
+2003-07-29 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * include/gc.h (GC_CreateThread): Declare with WINAPI
+ attribute.
+ * win32_threads.c (GC_CreateThread): Make definitions consistent
+ with declaration. Cast &thread_table[i].handle to PHANDLE
+ in call to DuplicateHandle
+ (thread_start): Declare as static.
+
+
+Index: win32_threads.c
+===================================================================
+RCS file: /cvs/gcc/gcc/boehm-gc/win32_threads.c,v
+retrieving revision 1.14
+diff -c -3 -p -r1.14 win32_threads.c
+*** win32_threads.c 28 Jul 2003 04:18:21 -0000 1.14
+--- win32_threads.c 29 Jul 2003 08:49:33 -0000
+*************** void GC_get_next_stack(char *start, char
+*** 376,382 ****
+
+ /* We register threads from DllMain */
+
+! GC_API HANDLE GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
+--- 376,382 ----
+
+ /* We register threads from DllMain */
+
+! GC_API HANDLE WINAPI GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
+*************** typedef struct {
+*** 397,405 ****
+ LPVOID param;
+ } thread_args;
+
+! DWORD WINAPI thread_start(LPVOID arg);
+
+! HANDLE WINAPI GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
+--- 397,405 ----
+ LPVOID param;
+ } thread_args;
+
+! static DWORD WINAPI thread_start(LPVOID arg);
+
+! GC_API HANDLE WINAPI GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId )
+*************** HANDLE WINAPI GC_CreateThread(
+*** 445,451 ****
+ if (!DuplicateHandle(GetCurrentProcess(),
+ thread_h,
+ GetCurrentProcess(),
+! &thread_table[i].handle,
+ 0,
+ 0,
+ DUPLICATE_SAME_ACCESS)) {
+--- 445,451 ----
+ if (!DuplicateHandle(GetCurrentProcess(),
+ thread_h,
+ GetCurrentProcess(),
+! (PHANDLE) &thread_table[i].handle,
+ 0,
+ 0,
+ DUPLICATE_SAME_ACCESS)) {
+Index: include/gc.h
+===================================================================
+RCS file: /cvs/gcc/gcc/boehm-gc/include/gc.h,v
+retrieving revision 1.10
+diff -c -3 -p -r1.10 gc.h
+*** include/gc.h 28 Jul 2003 04:18:22 -0000 1.10
+--- include/gc.h 29 Jul 2003 08:49:36 -0000
+*************** extern void GC_thr_init(); /* Needed for
+*** 895,901 ****
+ * and does then use DllMain to keep track of thread creations. But
+new code
+ * should be built to call GC_CreateThread.
+ */
+! GC_API HANDLE GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );
+--- 895,901 ----
+ * and does then use DllMain to keep track of thread creations. But
+new code
+ * should be built to call GC_CreateThread.
+ */
+! GC_API HANDLE WINAPI GC_CreateThread(
+ LPSECURITY_ATTRIBUTES lpThreadAttributes,
+ DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress,
+ LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId );