Patch for Preview: Escape DllMain in boehm-gc (Take 2)

Mohan Embar gnustuff@thisiscool.com
Sat Mar 8 03:55:00 GMT 2003


Hi Patch Folks,

Ranjit>> As for the patch itself, I believe that GC_DLL doesn't
Ranjit>> actually get defined by anyone in this release - this
Ranjit>> should get defined most likely if "--enable-shared" is
Ranjit>> given via changes in configure.in.

Here is the GC_DLL patch I promised to redo.

Again, here is the issue it attempts to resolve:

http://gcc.gnu.org/ml/java/2003-02/msg00291.html

This seems to work properly when I built the cross compiler.

I think this patch (and the other patches I'm submitting tonight)
all satisfy the < ~10 lines of code rule, so hopefully the fact
that I haven't received the FSF paperwork yet shouldn't be an issue.

Enjoy.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/

ChangeLog
2003-03-07  Mohan Embar  <gnustuff@thisiscool.com>

	* configure.in: define GC_DLL under mingw if --enable-shared
	* configure: rebuilt
	* win32_threads.c: add #ifdef GC_DLL around DllMain

Index: configure.in
===================================================================
RCS file: /cvsroot/gcc/gcc/boehm-gc/configure.in,v
retrieving revision 1.43.14.2
diff -u -2 -r1.43.14.2 configure.in
--- configure.in	20 Feb 2003 09:12:13 -0000	1.43.14.2
+++ configure.in	8 Mar 2003 03:22:16 -0000
@@ -117,4 +117,7 @@
     AC_DEFINE(GC_WIN32_THREADS)
     AC_DEFINE(NO_GETENV)
+    if test $enable_shared = yes; then
+      AC_DEFINE(GC_DLL)
+    fi
     ;;
  decosf1 | irix | mach | os2 | solaris | dce | vxworks)
Index: win32_threads.c
===================================================================
RCS file: /cvsroot/gcc/gcc/boehm-gc/win32_threads.c,v
retrieving revision 1.12
diff -u -2 -r1.12 win32_threads.c
--- win32_threads.c	24 Sep 2002 00:59:52 -0000	1.12
+++ win32_threads.c	8 Mar 2003 03:22:17 -0000
@@ -528,4 +528,6 @@
 LONG WINAPI GC_write_fault_handler(struct _EXCEPTION_POINTERS *exc_info);
 
+#ifdef GC_DLL
+
 /*
  * This isn't generally safe, since DllMain is not premptible.
@@ -635,4 +637,6 @@
   return TRUE;
 }
+
+#   endif /* GC_DLL */
 
 # endif /* !MSWINCE */






More information about the Java-patches mailing list