Hi,

On Fri, Oct 26, 2001 at 01:19:10PM +0200, Mark Wielaard wrote:
> 
> There are currently two construct in Classpath that cannot be compiled with
> gcj 3.0.2 but they have easy workaround. I have attached the needed patch
> and I will check it in. With this gcj 3.0.2 can compile classpath out of the
> box with gcj -C -d lib @classes (but see below).
> 
> 2001-10-26  Mark Wielaard  <[EMAIL PROTECTED]>
> 
>         * java/lang/reflect/Proxy.java (getProxyClass): 
>         Workaround for bug in gcj 
>         * java/util/TreeMap.java (TreeIterator (int)): likewise

Forgot to actually attach the patch. It has been checked in.

Cheers,

Mark

-- 
Stuff to read:
    <http://www.toad.com/gnu/whatswrong.html>
  What's Wrong with Copy Protection, by John Gilmore
Index: java/lang/reflect/Proxy.java
===================================================================
RCS file: /cvs/classpath/java/lang/reflect/Proxy.java,v
retrieving revision 1.1
diff -u -r1.1 Proxy.java
--- java/lang/reflect/Proxy.java        2001/10/21 01:12:06     1.1
+++ java/lang/reflect/Proxy.java        2001/10/26 11:01:13
@@ -256,9 +256,19 @@
            ProxyData data = (Configuration.HAVE_NATIVE_GET_PROXY_DATA
                              ? getProxyData0(loader, interfaces)
                              : ProxyData.getProxyData(pt));
-           clazz = (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS
-                    ? generateProxyClass0(loader, data)
-                    : new ClassFactory(data).generate(loader));
+
+           // FIXME workaround for bug in gcj 3.0.x
+           // Not needed with the latest gcj from cvs
+           //clazz = (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS
+           //         ? generateProxyClass0(loader, data)
+           //         : new ClassFactory(data).generate(loader));
+           if (Configuration.HAVE_NATIVE_GENERATE_PROXY_CLASS)
+             clazz = generateProxyClass0(loader, data);
+           else
+             {
+               ClassFactory cf = new ClassFactory(data);
+               clazz = cf.generate(loader);
+             }
          }
 
        Object check = proxyClasses.put(pt, clazz);
Index: java/util/TreeMap.java
===================================================================
RCS file: /cvs/classpath/java/util/TreeMap.java,v
retrieving revision 1.14
diff -u -r1.14 TreeMap.java
--- java/util/TreeMap.java      2001/10/25 07:34:19     1.14
+++ java/util/TreeMap.java      2001/10/26 11:01:13
@@ -1391,7 +1391,11 @@
      */
     TreeIterator(int type)
     {
-      this(type, firstNode(), nil);
+      // FIXME gcj cannot handle this. Bug java/4695
+      // this(type, firstNode(), nil);
+      this.type = type;
+      this.next = firstNode();
+      this.max = nil;
     }
 
     /**

Reply via email to