This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Fix bug 27170


>>>>> "Rutger" == Rutger Ovidius <r_ovidius@eml.cc> writes:

Rutger> This patch breaks bootstrap on mingw. Somehow it pulls in windef.h
Rutger> which causes a #define STRICT 1, which breaks Modifier.h:

I'm checking this in.  I think it will fix the problem, because
platform.h (included from cni.h) on Windows has '#undef STRICT'.
I also moved the gc.h include a bit later.

Let me know if this works for you.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* gnu/gcj/runtime/natSharedLibLoader.cc: Include gc.h later.
	Include platform.h.  Set GC_DEBUG before including gc.h, if
	needed.

Index: gnu/gcj/runtime/natSharedLibLoader.cc
===================================================================
--- gnu/gcj/runtime/natSharedLibLoader.cc	(revision 113226)
+++ gnu/gcj/runtime/natSharedLibLoader.cc	(working copy)
@@ -1,6 +1,6 @@
 // natSharedLibLoader.cc - Implementation of SharedLibHelper native methods.
 
-/* Copyright (C) 2001, 2003, 2004, 2005  Free Software Foundation
+/* Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -9,12 +9,8 @@
 details.  */
 
 #include <config.h>
+#include <platform.h>
 
-// If we're using the Boehm GC, then we need this include to override dlopen.
-#ifdef HAVE_BOEHM_GC
-#include <gc.h>
-#endif /* HAVE_BOEHM_GC */
-
 #include <gcj/cni.h>
 #include <jvm.h>
 #include <execution.h>
@@ -24,6 +20,15 @@
 #include <java/lang/UnsupportedOperationException.h>
 #include <java/lang/UnknownError.h>
 
+// If we're using the Boehm GC, then we need this include to override dlopen.
+#ifdef HAVE_BOEHM_GC
+// Set GC_DEBUG before including gc.h!
+#ifdef LIBGCJ_GC_DEBUG
+# define GC_DEBUG
+#endif
+#include <gc.h>
+#endif /* HAVE_BOEHM_GC */
+
 #ifdef HAVE_DLOPEN
 #include <dlfcn.h>
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]