Commit 58ddc179 by Matthias Klose

Import GNU Classpath (libgcj-import-20081021).

2008-10-22  Matthias Klose  <doko@ubuntu.com>

        Import GNU Classpath (libgcj-import-20081021).

        * Regenerate class and header files.
        * Regenerate auto* files.

From-SVN: r141302
parent 51c869ca
2008-10-22 Matthias Klose <doko@ubuntu.com>
Import GNU Classpath (libgcj-import-20081021).
* Regenerate class and header files.
* Regenerate auto* files.
2008-10-21 Andrew John Hughes <gnu_andrew@member.fsf.org> 2008-10-21 Andrew John Hughes <gnu_andrew@member.fsf.org>
* sources.am, Makfile.in: Regenerate. * sources.am, Makfile.in: Regenerate.
......
...@@ -5,6 +5,23 @@ ...@@ -5,6 +5,23 @@
* tools/Makefile.am: * tools/Makefile.am:
Use gjdoc_gendir when calling antlr. Use gjdoc_gendir when calling antlr.
2008-10-17 Robert Lougher <rob.lougher@gmail.com>
* native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c
(Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector):
Release 'fonts'.
2008-10-16 Tom Tromey <tromey@redhat.com>
* tools/gnu/classpath/tools/jar/WorkSet.java (initSet): Use
foreach. Change argument type.
(WorkSet): Change argument type.
* tools/gnu/classpath/tools/jar/Indexer.java (indexJarFile): Use
foreach.
* tools/gnu/classpath/tools/jar/Creator.java
(writeCommandLineEntries): Use foreach.
(getAllEntries): Likewise.
2008-10-15 Andrew John Hughes <gnu_andrew@member.fsf.org> 2008-10-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac: * configure.ac:
...@@ -18,7 +35,7 @@ ...@@ -18,7 +35,7 @@
Only build GJDoc parser when both Only build GJDoc parser when both
CREATE_GJDOC and CREATE_GJDOC_PARSER CREATE_GJDOC and CREATE_GJDOC_PARSER
are on. are on.
2008-10-02 Andrew John Hughes <gnu_andrew@member.fsf.org> 2008-10-02 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac: * configure.ac:
...@@ -32,15 +49,72 @@ ...@@ -32,15 +49,72 @@
* tools/Makefile.am: * tools/Makefile.am:
Support CREATE_GJDOC_PARSER option. Support CREATE_GJDOC_PARSER option.
2008-09-29 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_antlr.m4:
Check for antlr binary as well.
2008-09-28 Andrew John Hughes <gnu_andrew@member.fsf.org>
* configure.ac:
Always check for JAVA prior to ANTLR check.
* java/lang/ThreadLocal.java,
* java/lang/ThreadLocalMap.java:
Rename notFound back to sentinel to avoid
potential issues with use of the old name.
Cleanup formatting.
* java/nio/Buffer.java,
* java/nio/ByteBuffer.java,
* java/nio/ByteBufferImpl.java,
* java/nio/CharBuffer.java,
* java/nio/CharViewBufferImpl.java,
* java/nio/DirectByteBufferImpl.java,
* java/nio/DoubleBuffer.java,
* java/nio/DoubleBufferImpl.java,
* java/nio/FloatBuffer.java,
* java/nio/FloatBufferImpl.java,
* java/nio/IntBuffer.java,
* java/nio/LongBuffer.java,
* java/nio/LongBufferImpl.java,
* java/nio/MappedByteBuffer.java,
* java/nio/ShortBuffer.java,
* java/nio/ShortBufferImpl.java,
* java/nio/ShortViewBufferImpl.java:
Cleanup formatting.
2008-09-16 Andrew John Hughes <gnu_andrew@member.fsf.org>
* java/lang/System.java (getenv): Reinstate
use of EnvironmentMap as opposed to raw
HashMap.
2008-09-16 Mario Torre <neugens@aicas.com>
* java/lang/System.java (getenv): Fix env entries of the form
key=value=value=value not parsed correctly.
2008-09-15 Andrew John Hughes <gnu_andrew@member.fsf.org>
Reported by: Matthias Klose
* tools/Makefile.am:
Simplify the addition of the ANTLR
JAR file to the classpath.
2008-09-14 Matthias Klose <doko@ubuntu.com>
* m4/ac_prog_antlr.m4:
Allow use of runantlr on systems
which have it (Debian/Ubuntu).
2008-09-14 Andrew John Hughes <gnu_andrew@member.fsf.org> 2008-09-14 Andrew John Hughes <gnu_andrew@member.fsf.org>
* examples/Makefile.am: * examples/Makefile.am:
Check lib directly as well as glibj.zip Check lib directly as well as glibj.zip
for boot classes. for boot classes.
* m4/acinclude.m4: * m4/acinclude.m4:
Only require the class files to be built Only require the class files to be built
to allow the tools and examples to be built, to allow the tools and examples to be built,
not the installation of glibj.zip. not the installation of glibj.zip.
* tools/Makefile.am: * tools/Makefile.am:
Check lib directly as well as glibj.zip Check lib directly as well as glibj.zip
for boot classes. for boot classes.
...@@ -435,7 +509,6 @@ ...@@ -435,7 +509,6 @@
* m4/acinclude.m4 (CLASSPATH_COND_IF): New macro. * m4/acinclude.m4 (CLASSPATH_COND_IF): New macro.
* configure.ac: Use it. * configure.ac: Use it.
* configure: Regenerate.
* tools/Makefile.am (!CREATE_WRAPPERS): Update comment. * tools/Makefile.am (!CREATE_WRAPPERS): Update comment.
2008-07-12 Andrew John Hughes <gnu_andrew@member.fsf.org> 2008-07-12 Andrew John Hughes <gnu_andrew@member.fsf.org>
...@@ -1578,10 +1651,6 @@ ...@@ -1578,10 +1651,6 @@
* javax/management/StandardMBean.java: * javax/management/StandardMBean.java:
Fix warnings due to use of generics. Fix warnings due to use of generics.
2008-06-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* native/fdlibm/dtoa.c: include stdlib.h, for 'free'.
2008-06-16 Andrew John Hughes <gnu_andrew@member.fsf.org> 2008-06-16 Andrew John Hughes <gnu_andrew@member.fsf.org>
* javax/management/openmbean/ArrayType.java, * javax/management/openmbean/ArrayType.java,
......
...@@ -1015,18 +1015,17 @@ AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue) ...@@ -1015,18 +1015,17 @@ AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue)
AC_SUBST(PATH_TO_GLIBJ_ZIP) AC_SUBST(PATH_TO_GLIBJ_ZIP)
if test "x${TOOLSDIR}" != x; then if test "x${TOOLSDIR}" != x; then
dnl GCJ LOCAL
if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then
AC_PROG_JAVA AC_PROG_JAVA
fi fi
dnl END GCJ LOCAL
if test "x${COMPILE_GJDOC}" = xyes; then if test "x${COMPILE_GJDOC}" = xyes; then
AC_LIB_ANTLR AC_LIB_ANTLR
if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then dnl GCJ LOCAL
dnl GCJ LOCAL if test "x${REGENERATE_GJDOC_PARSER}" = xyes && test "x${enable_java_maintainer_mode}" = xyes; then
if test "x${enable_java_maintainer_mode}" = xyes; then dnl END GCJ LOCAL
AC_PROG_JAVA
AC_PROG_ANTLR(2,7,1) AC_PROG_ANTLR(2,7,1)
fi
dnl END GCJ LOCAL
fi fi
fi fi
fi fi
......
...@@ -546,20 +546,28 @@ public final class System ...@@ -546,20 +546,28 @@ public final class System
SecurityManager sm = SecurityManager.current; // Be thread-safe. SecurityManager sm = SecurityManager.current; // Be thread-safe.
if (sm != null) if (sm != null)
sm.checkPermission(new RuntimePermission("getenv.*")); sm.checkPermission(new RuntimePermission("getenv.*"));
if (environmentMap == null) if (environmentMap == null)
{ {
List<String> environ = (List<String>)VMSystem.environ();
Map<String,String> variables = new EnvironmentMap(); Map<String,String> variables = new EnvironmentMap();
for (String pair : environ) List<String> environ = (List<String>)VMSystem.environ();
{ for (String envEntry : environ)
String[] parts = pair.split("="); {
if (parts.length == 2) // avoid broken and null entries
variables.put(parts[0], parts[1]); if (envEntry != null && !envEntry.endsWith("="))
else {
variables.put(parts[0], ""); // it's perfectly legal that some entries may be in the form
} // key=value=value=value
environmentMap = Collections.unmodifiableMap(variables); int equalSignIndex = envEntry.indexOf('=');
String key = envEntry.substring(0, equalSignIndex);
String value = envEntry.substring(equalSignIndex + 1);
variables.put(key, value);
}
}
environmentMap = Collections.unmodifiableMap(variables);
} }
return environmentMap; return environmentMap;
} }
......
...@@ -90,7 +90,7 @@ public class ThreadLocal<T> ...@@ -90,7 +90,7 @@ public class ThreadLocal<T>
* user. Do not expose this to the public. Package visible for use by * user. Do not expose this to the public. Package visible for use by
* InheritableThreadLocal * InheritableThreadLocal
*/ */
static final Object notFound = new Object(); static final Object sentinel = new Object();
/** /**
* The base for the computation of the next hash for a thread local. * The base for the computation of the next hash for a thread local.
...@@ -100,7 +100,8 @@ public class ThreadLocal<T> ...@@ -100,7 +100,8 @@ public class ThreadLocal<T>
/** /**
* Allocate a new hash. * Allocate a new hash.
*/ */
private synchronized int computeNextHash() { private synchronized int computeNextHash()
{
return nextHashBase++ * 6709; return nextHashBase++ * 6709;
} }
...@@ -144,7 +145,7 @@ public class ThreadLocal<T> ...@@ -144,7 +145,7 @@ public class ThreadLocal<T>
// Note that we don't have to synchronize, as only this thread will // Note that we don't have to synchronize, as only this thread will
// ever modify the map. // ever modify the map.
T value = (T) map.get(this); T value = (T) map.get(this);
if (value == notFound) if (value == sentinel)
{ {
value = initialValue(); value = initialValue();
map.set(this, value); map.set(this, value);
......
...@@ -56,7 +56,8 @@ public abstract class Buffer ...@@ -56,7 +56,8 @@ public abstract class Buffer
* *
* Should be package private. * Should be package private.
*/ */
Buffer (int capacity, int limit, int position, int mark, Pointer address) Buffer (int capacity, int limit, int position, int mark,
Pointer address)
{ {
this.address = address; this.address = address;
......
/* DirectByteBufferImpl.java -- /* DirectByteBufferImpl.java --
Copyright (C) 2003, 2004 Free Software Foundation, Inc. Copyright (C) 2003, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -60,8 +60,8 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -60,8 +60,8 @@ abstract class DirectByteBufferImpl extends ByteBuffer
static final class ReadOnly extends DirectByteBufferImpl static final class ReadOnly extends DirectByteBufferImpl
{ {
ReadOnly(Object owner, Pointer address, ReadOnly(Object owner, Pointer address,
int capacity, int limit, int capacity, int limit,
int position) int position)
{ {
super(owner, address, capacity, limit, position); super(owner, address, capacity, limit, position);
} }
...@@ -89,9 +89,14 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -89,9 +89,14 @@ abstract class DirectByteBufferImpl extends ByteBuffer
super(capacity); super(capacity);
} }
ReadWrite(Pointer address, int capacity)
{
super(address, capacity);
}
ReadWrite(Object owner, Pointer address, ReadWrite(Object owner, Pointer address,
int capacity, int limit, int capacity, int limit,
int position) int position)
{ {
super(owner, address, capacity, limit, position); super(owner, address, capacity, limit, position);
} }
...@@ -104,13 +109,20 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -104,13 +109,20 @@ abstract class DirectByteBufferImpl extends ByteBuffer
DirectByteBufferImpl(int capacity) DirectByteBufferImpl(int capacity)
{ {
super(capacity, capacity, 0, -1, VMDirectByteBuffer.allocate(capacity), null, 0); super(capacity, capacity, 0, -1,
VMDirectByteBuffer.allocate(capacity), null, 0);
this.owner = this; this.owner = this;
} }
DirectByteBufferImpl(Pointer address, int capacity)
{
super(capacity, capacity, 0, -1, address, null, 0);
this.owner = null;
}
DirectByteBufferImpl(Object owner, Pointer address, DirectByteBufferImpl(Object owner, Pointer address,
int capacity, int limit, int capacity, int limit,
int position) int position)
{ {
super(capacity, limit, position, -1, address, null, 0); super(capacity, limit, position, -1, address, null, 0);
this.owner = owner; this.owner = owner;
...@@ -118,7 +130,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -118,7 +130,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer
/** /**
* Allocates a new direct byte buffer. * Allocates a new direct byte buffer.
*/ */
public static ByteBuffer allocate(int capacity) public static ByteBuffer allocate(int capacity)
{ {
return new DirectByteBufferImpl.ReadWrite(capacity); return new DirectByteBufferImpl.ReadWrite(capacity);
...@@ -129,7 +141,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -129,7 +141,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer
if (owner == this) if (owner == this)
VMDirectByteBuffer.free(address); VMDirectByteBuffer.free(address);
} }
public byte get() public byte get()
{ {
checkForUnderflow(); checkForUnderflow();
...@@ -168,7 +180,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -168,7 +180,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer
position(pos + 1); position(pos + 1);
return this; return this;
} }
public ByteBuffer put(int index, byte value) public ByteBuffer put(int index, byte value)
{ {
checkIndex(index); checkIndex(index);
...@@ -176,24 +188,23 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -176,24 +188,23 @@ abstract class DirectByteBufferImpl extends ByteBuffer
VMDirectByteBuffer.put(address, index, value); VMDirectByteBuffer.put(address, index, value);
return this; return this;
} }
public ByteBuffer put (byte[] src, int offset, int length) public ByteBuffer put (byte[] src, int offset, int length)
{ {
checkArraySize (src.length, offset, length); checkArraySize (src.length, offset, length);
checkForUnderflow (length); checkForUnderflow (length);
int index = position (); int index = position ();
VMDirectByteBuffer.put (address, index, src, offset, length); VMDirectByteBuffer.put (address, index, src, offset, length);
position (index + length); position (index + length);
return this; return this;
} }
void shiftDown(int dst_offset, int src_offset, int count) void shiftDown(int dst_offset, int src_offset, int count)
{ {
VMDirectByteBuffer.shiftDown(address, dst_offset, src_offset, count); VMDirectByteBuffer.shiftDown(address, dst_offset, src_offset, count);
} }
public ByteBuffer compact() public ByteBuffer compact()
{ {
checkIfReadOnly(); checkIfReadOnly();
...@@ -201,15 +212,15 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -201,15 +212,15 @@ abstract class DirectByteBufferImpl extends ByteBuffer
int pos = position(); int pos = position();
if (pos > 0) if (pos > 0)
{ {
int count = remaining(); int count = remaining();
VMDirectByteBuffer.shiftDown(address, 0, pos, count); VMDirectByteBuffer.shiftDown(address, 0, pos, count);
position(count); position(count);
limit(capacity()); limit(capacity());
} }
else else
{ {
position(limit()); position(limit());
limit(capacity()); limit(capacity());
} }
return this; return this;
} }
...@@ -244,9 +255,9 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -244,9 +255,9 @@ abstract class DirectByteBufferImpl extends ByteBuffer
if (mark != pos) if (mark != pos)
{ {
result.position(mark); result.position(mark);
result.mark(); result.mark();
result.position(pos); result.position(pos);
} }
return result; return result;
} }
...@@ -300,18 +311,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -300,18 +311,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{ {
return ByteBufferHelper.getChar(this, order()); return ByteBufferHelper.getChar(this, order());
} }
public ByteBuffer putChar(char value) public ByteBuffer putChar(char value)
{ {
ByteBufferHelper.putChar(this, value, order()); ByteBufferHelper.putChar(this, value, order());
return this; return this;
} }
public char getChar(int index) public char getChar(int index)
{ {
return ByteBufferHelper.getChar(this, index, order()); return ByteBufferHelper.getChar(this, index, order());
} }
public ByteBuffer putChar(int index, char value) public ByteBuffer putChar(int index, char value)
{ {
ByteBufferHelper.putChar(this, index, value, order()); ByteBufferHelper.putChar(this, index, value, order());
...@@ -322,18 +333,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -322,18 +333,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{ {
return ByteBufferHelper.getShort(this, order()); return ByteBufferHelper.getShort(this, order());
} }
public ByteBuffer putShort(short value) public ByteBuffer putShort(short value)
{ {
ByteBufferHelper.putShort(this, value, order()); ByteBufferHelper.putShort(this, value, order());
return this; return this;
} }
public short getShort(int index) public short getShort(int index)
{ {
return ByteBufferHelper.getShort(this, index, order()); return ByteBufferHelper.getShort(this, index, order());
} }
public ByteBuffer putShort(int index, short value) public ByteBuffer putShort(int index, short value)
{ {
ByteBufferHelper.putShort(this, index, value, order()); ByteBufferHelper.putShort(this, index, value, order());
...@@ -344,18 +355,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -344,18 +355,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{ {
return ByteBufferHelper.getInt(this, order()); return ByteBufferHelper.getInt(this, order());
} }
public ByteBuffer putInt(int value) public ByteBuffer putInt(int value)
{ {
ByteBufferHelper.putInt(this, value, order()); ByteBufferHelper.putInt(this, value, order());
return this; return this;
} }
public int getInt(int index) public int getInt(int index)
{ {
return ByteBufferHelper.getInt(this, index, order()); return ByteBufferHelper.getInt(this, index, order());
} }
public ByteBuffer putInt(int index, int value) public ByteBuffer putInt(int index, int value)
{ {
ByteBufferHelper.putInt(this, index, value, order()); ByteBufferHelper.putInt(this, index, value, order());
...@@ -366,18 +377,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -366,18 +377,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{ {
return ByteBufferHelper.getLong(this, order()); return ByteBufferHelper.getLong(this, order());
} }
public ByteBuffer putLong(long value) public ByteBuffer putLong(long value)
{ {
ByteBufferHelper.putLong(this, value, order()); ByteBufferHelper.putLong(this, value, order());
return this; return this;
} }
public long getLong(int index) public long getLong(int index)
{ {
return ByteBufferHelper.getLong(this, index, order()); return ByteBufferHelper.getLong(this, index, order());
} }
public ByteBuffer putLong(int index, long value) public ByteBuffer putLong(int index, long value)
{ {
ByteBufferHelper.putLong(this, index, value, order()); ByteBufferHelper.putLong(this, index, value, order());
...@@ -388,13 +399,13 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -388,13 +399,13 @@ abstract class DirectByteBufferImpl extends ByteBuffer
{ {
return ByteBufferHelper.getFloat(this, order()); return ByteBufferHelper.getFloat(this, order());
} }
public ByteBuffer putFloat(float value) public ByteBuffer putFloat(float value)
{ {
ByteBufferHelper.putFloat(this, value, order()); ByteBufferHelper.putFloat(this, value, order());
return this; return this;
} }
public float getFloat(int index) public float getFloat(int index)
{ {
return ByteBufferHelper.getFloat(this, index, order()); return ByteBufferHelper.getFloat(this, index, order());
...@@ -416,12 +427,12 @@ abstract class DirectByteBufferImpl extends ByteBuffer ...@@ -416,12 +427,12 @@ abstract class DirectByteBufferImpl extends ByteBuffer
ByteBufferHelper.putDouble(this, value, order()); ByteBufferHelper.putDouble(this, value, order());
return this; return this;
} }
public double getDouble(int index) public double getDouble(int index)
{ {
return ByteBufferHelper.getDouble(this, index, order()); return ByteBufferHelper.getDouble(this, index, order());
} }
public ByteBuffer putDouble(int index, double value) public ByteBuffer putDouble(int index, double value)
{ {
ByteBufferHelper.putDouble(this, index, value, order()); ByteBufferHelper.putDouble(this, index, value, order());
......
...@@ -50,8 +50,8 @@ public abstract class IntBuffer extends Buffer ...@@ -50,8 +50,8 @@ public abstract class IntBuffer extends Buffer
final int array_offset; final int array_offset;
final int[] backing_buffer; final int[] backing_buffer;
IntBuffer (int capacity, int limit, int position, int mark, RawData address, IntBuffer (int capacity, int limit, int position, int mark,
int[] backing_buffer, int array_offset) RawData address, int[] backing_buffer, int array_offset)
{ {
super (capacity, limit, position, mark, address); super (capacity, limit, position, mark, address);
this.backing_buffer = backing_buffer; this.backing_buffer = backing_buffer;
......
...@@ -49,7 +49,8 @@ final class ShortViewBufferImpl extends ShortBuffer ...@@ -49,7 +49,8 @@ final class ShortViewBufferImpl extends ShortBuffer
ShortViewBufferImpl (ByteBuffer bb, int capacity) ShortViewBufferImpl (ByteBuffer bb, int capacity)
{ {
super (capacity, capacity, 0, -1, bb.isDirect() ? super (capacity, capacity, 0, -1, bb.isDirect() ?
VMDirectByteBuffer.adjustAddress(bb.address, bb.position()):null, null, 0); VMDirectByteBuffer.adjustAddress(bb.address, bb.position()):null,
null, 0);
this.bb = bb; this.bb = bb;
this.offset = bb.position(); this.offset = bb.position();
this.readOnly = bb.isReadOnly(); this.readOnly = bb.isReadOnly();
...@@ -61,7 +62,8 @@ final class ShortViewBufferImpl extends ShortBuffer ...@@ -61,7 +62,8 @@ final class ShortViewBufferImpl extends ShortBuffer
boolean readOnly, ByteOrder endian) boolean readOnly, ByteOrder endian)
{ {
super (capacity, limit, position, mark, bb.isDirect() ? super (capacity, limit, position, mark, bb.isDirect() ?
VMDirectByteBuffer.adjustAddress(bb.address, offset):null, null, 0); VMDirectByteBuffer.adjustAddress(bb.address, offset):null,
null, 0);
this.bb = bb; this.bb = bb;
this.offset = offset; this.offset = offset;
this.readOnly = readOnly; this.readOnly = readOnly;
......
/* gnu_java_awt_peer_gtk_CairoGraphics2d.c /* gnu_java_awt_peer_gtk_CairoGraphics2d.c
Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -371,8 +371,9 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector ...@@ -371,8 +371,9 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector
cairo_font_face_destroy (ft); cairo_font_face_destroy (ft);
pango_fc_font_unlock_face(font); pango_fc_font_unlock_face(font);
} }
gdk_threads_leave(); gdk_threads_leave();
(*env)->ReleaseLongArrayElements (env, java_fontset, fonts, 0);
g_free(glyphs); g_free(glyphs);
} }
......
## Input file for automake to generate the Makefile.in used by configure ## Input file for automake to generate the Makefile.in used by configure
if CREATE_GJDOC
## GCJ LOCAL: always put source files in srcdir
## if CREATE_GJDOC_PARSER
## gjdoc_gendir = ${top_builddir}/tools/generated
## else
gjdoc_gendir = ${top_srcdir}/tools/generated
## endif
## END GCJ LOCAL
ANTLR_CLASSPATH = $(ANTLR_JAR):$(gjdoc_gendir)
endif
## GCJ LOCAL: use srcdir to find core classes. ## GCJ LOCAL: use srcdir to find core classes.
GLIBJ_BOOTCLASSPATH='$(top_srcdir)/lib' GLIBJ_BOOTCLASSPATH='$(top_srcdir)/lib'
GLIBJ_CLASSPATH=.:$(srcdir)/asm:$(ANTLR_CLASSPATH) GLIBJ_CLASSPATH=.:$(srcdir)/asm:$(ANTLR_CLASSPATH)
...@@ -12,17 +23,6 @@ else ...@@ -12,17 +23,6 @@ else
JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH) JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH)
endif endif
if CREATE_GJDOC
## GCJ LOCAL: always put source files in srcdir
## if CREATE_GJDOC_PARSER
## gjdoc_gendir = ${top_builddir}/tools/generated
## else
gjdoc_gendir = ${top_srcdir}/tools/generated
## endif
## END GCJ LOCAL
ANTLR_CLASSPATH = $(ANTLR_JAR):$(gjdoc_gendir)
endif
if CREATE_WRAPPERS if CREATE_WRAPPERS
bin_SCRIPTS = bin_SCRIPTS =
bin_PROGRAMS = gappletviewer gjarsigner gkeytool \ bin_PROGRAMS = gappletviewer gjarsigner gkeytool \
...@@ -320,8 +320,19 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES) ...@@ -320,8 +320,19 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES)
## GCJ LOCAL: put classes in srcdir ## GCJ LOCAL: put classes in srcdir
## @rm -rf classes asm ## @rm -rf classes asm
## @mkdir_p@ classes asm ## @mkdir_p@ classes asm
if JAVA_MAINTAINER_MODE
if CREATE_GJDOC
if CREATE_GJDOC_PARSER
## Generate antlr sources.
@mkdir_p@ $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr
$(ANTLR) -o $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr/ \
$(srcdir)/gnu/classpath/tools/gjdoc/expr/java-expression.g
endif
endif
## Compile ASM separately as it is latin-1 encoded. ## Compile ASM separately as it is latin-1 encoded.
find $(srcdir)/external/asm -name '*.java' -print > asm.lst find $(srcdir)/external/asm -name '*.java' -print > asm.lst
AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \
$$AC -g -w -d $(srcdir)/asm @asm.lst
find $(srcdir)/gnu/classpath/tools \ find $(srcdir)/gnu/classpath/tools \
$(srcdir)/com/sun/javadoc \ $(srcdir)/com/sun/javadoc \
$(srcdir)/com/sun/tools/doclets \ $(srcdir)/com/sun/tools/doclets \
...@@ -339,20 +350,8 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES) ...@@ -339,20 +350,8 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES)
else \ else \
echo -n > vm-tools.lst; \ echo -n > vm-tools.lst; \
fi fi
cat classes.lst asm.lst vm-tools.lst > all-classes.lst
if JAVA_MAINTAINER_MODE
if CREATE_GJDOC
if CREATE_GJDOC_PARSER
## Generate antlr sources.
@mkdir_p@ $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr
$(ANTLR) -o $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr \
$(srcdir)/gnu/classpath/tools/gjdoc/expr/java-expression.g
endif
endif
## Compile ASM separately as it is latin-1 encoded.
AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \
$$AC -g -w -d $(srcdir)/asm @asm.lst
$(JCOMPILER) $(USE_JAVAC_FLAGS) -g -d $(srcdir)/classes @classes.lst @vm-tools.lst $(JCOMPILER) $(USE_JAVAC_FLAGS) -g -d $(srcdir)/classes @classes.lst @vm-tools.lst
cat classes.lst asm.lst vm-tools.lst > all-classes.lst
endif endif
## END GCJ LOCAL ## END GCJ LOCAL
## Copy over tools resource files. ## Copy over tools resource files.
...@@ -364,8 +363,10 @@ endif ...@@ -364,8 +363,10 @@ endif
echo " cp $(srcdir)/resource/$$p classes/$$p"; \ echo " cp $(srcdir)/resource/$$p classes/$$p"; \
cp $(srcdir)/resource/$$p classes/$$p; \ cp $(srcdir)/resource/$$p classes/$$p; \
done done
## BEGIN GCJ LOCAL
cp -pR $(srcdir)/asm . cp -pR $(srcdir)/asm .
cp -pR $(srcdir)/classes . cp -pR $(srcdir)/classes .
## END GCJ LOCAL
if CREATE_GJDOC if CREATE_GJDOC
## Copy over gjdoc resource files. ## Copy over gjdoc resource files.
for res in $(gjdoc_resources); do \ for res in $(gjdoc_resources); do \
......
...@@ -447,14 +447,14 @@ target_vendor = @target_vendor@ ...@@ -447,14 +447,14 @@ target_vendor = @target_vendor@
toolexeclibdir = @toolexeclibdir@ toolexeclibdir = @toolexeclibdir@
uudecode = @uudecode@ uudecode = @uudecode@
vm_classes = @vm_classes@ vm_classes = @vm_classes@
@CREATE_GJDOC_TRUE@gjdoc_gendir = ${top_srcdir}/tools/generated
@CREATE_GJDOC_TRUE@ANTLR_CLASSPATH = $(ANTLR_JAR):$(gjdoc_gendir)
GLIBJ_BOOTCLASSPATH = '$(top_srcdir)/lib' GLIBJ_BOOTCLASSPATH = '$(top_srcdir)/lib'
GLIBJ_CLASSPATH = .:$(srcdir)/asm:$(ANTLR_CLASSPATH) GLIBJ_CLASSPATH = .:$(srcdir)/asm:$(ANTLR_CLASSPATH)
@GCJ_JAVAC_FALSE@JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH) @GCJ_JAVAC_FALSE@JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH)
# Setup the compiler to use the GNU Classpath library we just built. # Setup the compiler to use the GNU Classpath library we just built.
@GCJ_JAVAC_TRUE@JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --encoding=UTF-8 --bootclasspath=$(GLIBJ_BOOTCLASSPATH) --classpath=$(GLIBJ_CLASSPATH) @GCJ_JAVAC_TRUE@JCOMPILER = $(JAVAC) $(JAVACFLAGS) -fsource=1.5 -ftarget=1.5 --encoding=UTF-8 --bootclasspath=$(GLIBJ_BOOTCLASSPATH) --classpath=$(GLIBJ_CLASSPATH)
@CREATE_GJDOC_TRUE@gjdoc_gendir = ${top_srcdir}/tools/generated
@CREATE_GJDOC_TRUE@ANTLR_CLASSPATH = $(ANTLR_JAR):$(gjdoc_gendir)
@CREATE_WRAPPERS_TRUE@bin_SCRIPTS = @CREATE_WRAPPERS_TRUE@bin_SCRIPTS =
@CREATE_WRAPPERS_TRUE@AM_CPPFLAGS = -Wall \ @CREATE_WRAPPERS_TRUE@AM_CPPFLAGS = -Wall \
@CREATE_WRAPPERS_TRUE@ -I$(top_srcdir)/include \ @CREATE_WRAPPERS_TRUE@ -I$(top_srcdir)/include \
...@@ -1312,31 +1312,31 @@ dist-hook: ...@@ -1312,31 +1312,31 @@ dist-hook:
# immediately. And copy the template files we use to the classes dir # immediately. And copy the template files we use to the classes dir
# so they get also included. # so they get also included.
$(TOOLS_ZIP): $(ALL_TOOLS_FILES) $(TOOLS_ZIP): $(ALL_TOOLS_FILES)
find $(srcdir)/external/asm -name '*.java' -print > asm.lst
find $(srcdir)/gnu/classpath/tools \
$(srcdir)/com/sun/javadoc \
$(srcdir)/com/sun/tools/doclets \
$(srcdir)/com/sun/tools/javadoc \
$(srcdir)/com/sun/tools/javac \
$(srcdir)/com/sun/tools/javah \
$(srcdir)/sun/rmi/rmic \
$(GJDOC_EX) \
-name '*.java' -print > classes.lst
if [ -f $(top_builddir)/../vm-tools-packages ]; then \
: > vm-tools.lst; \
for pkg in `cat $(top_builddir)/../vm-tools-packages`; do \
$(FIND) $(top_srcdir)/../$$pkg -follow -name '*.java' -print >> vm-tools.lst; \
done \
else \
echo -n > vm-tools.lst; \
fi
cat classes.lst asm.lst vm-tools.lst > all-classes.lst
@CREATE_GJDOC_PARSER_TRUE@@CREATE_GJDOC_TRUE@@JAVA_MAINTAINER_MODE_TRUE@ @mkdir_p@ $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr @CREATE_GJDOC_PARSER_TRUE@@CREATE_GJDOC_TRUE@@JAVA_MAINTAINER_MODE_TRUE@ @mkdir_p@ $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr
@CREATE_GJDOC_PARSER_TRUE@@CREATE_GJDOC_TRUE@@JAVA_MAINTAINER_MODE_TRUE@ $(ANTLR) -o $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr \ @CREATE_GJDOC_PARSER_TRUE@@CREATE_GJDOC_TRUE@@JAVA_MAINTAINER_MODE_TRUE@ $(ANTLR) -o $(gjdoc_gendir)/gnu/classpath/tools/gjdoc/expr/ \
@CREATE_GJDOC_PARSER_TRUE@@CREATE_GJDOC_TRUE@@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/gnu/classpath/tools/gjdoc/expr/java-expression.g @CREATE_GJDOC_PARSER_TRUE@@CREATE_GJDOC_TRUE@@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/gnu/classpath/tools/gjdoc/expr/java-expression.g
@JAVA_MAINTAINER_MODE_TRUE@ find $(srcdir)/external/asm -name '*.java' -print > asm.lst
@JAVA_MAINTAINER_MODE_TRUE@ AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \ @JAVA_MAINTAINER_MODE_TRUE@ AC=`echo $(JCOMPILER) | sed -e 's/UTF-8/ISO-8859-1/g'`; \
@JAVA_MAINTAINER_MODE_TRUE@ $$AC -g -w -d $(srcdir)/asm @asm.lst @JAVA_MAINTAINER_MODE_TRUE@ $$AC -g -w -d $(srcdir)/asm @asm.lst
@JAVA_MAINTAINER_MODE_TRUE@ find $(srcdir)/gnu/classpath/tools \
@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/com/sun/javadoc \
@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/com/sun/tools/doclets \
@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/com/sun/tools/javadoc \
@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/com/sun/tools/javac \
@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/com/sun/tools/javah \
@JAVA_MAINTAINER_MODE_TRUE@ $(srcdir)/sun/rmi/rmic \
@JAVA_MAINTAINER_MODE_TRUE@ $(GJDOC_EX) \
@JAVA_MAINTAINER_MODE_TRUE@ -name '*.java' -print > classes.lst
@JAVA_MAINTAINER_MODE_TRUE@ if [ -f $(top_builddir)/../vm-tools-packages ]; then \
@JAVA_MAINTAINER_MODE_TRUE@ : > vm-tools.lst; \
@JAVA_MAINTAINER_MODE_TRUE@ for pkg in `cat $(top_builddir)/../vm-tools-packages`; do \
@JAVA_MAINTAINER_MODE_TRUE@ $(FIND) $(top_srcdir)/../$$pkg -follow -name '*.java' -print >> vm-tools.lst; \
@JAVA_MAINTAINER_MODE_TRUE@ done \
@JAVA_MAINTAINER_MODE_TRUE@ else \
@JAVA_MAINTAINER_MODE_TRUE@ echo -n > vm-tools.lst; \
@JAVA_MAINTAINER_MODE_TRUE@ fi
@JAVA_MAINTAINER_MODE_TRUE@ $(JCOMPILER) $(USE_JAVAC_FLAGS) -g -d $(srcdir)/classes @classes.lst @vm-tools.lst @JAVA_MAINTAINER_MODE_TRUE@ $(JCOMPILER) $(USE_JAVAC_FLAGS) -g -d $(srcdir)/classes @classes.lst @vm-tools.lst
@JAVA_MAINTAINER_MODE_TRUE@ cat classes.lst asm.lst vm-tools.lst > all-classes.lst
@list=`cd $(srcdir)/resource && find gnu/classpath/tools com/sun/tools/javac \ @list=`cd $(srcdir)/resource && find gnu/classpath/tools com/sun/tools/javac \
sun/rmi/rmic $(GJDOC_EX) -name \*.properties -print -o -name \*.jav -print`; \ sun/rmi/rmic $(GJDOC_EX) -name \*.properties -print -o -name \*.jav -print`; \
for p in $$list; do \ for p in $$list; do \
......
/* Creator.java - create a new jar file /* Creator.java - create a new jar file
Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -49,7 +49,6 @@ import java.io.OutputStream; ...@@ -49,7 +49,6 @@ import java.io.OutputStream;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
import java.util.jar.Attributes; import java.util.jar.Attributes;
import java.util.jar.JarFile; import java.util.jar.JarFile;
import java.util.jar.JarOutputStream; import java.util.jar.JarOutputStream;
...@@ -179,13 +178,9 @@ public class Creator ...@@ -179,13 +178,9 @@ public class Creator
private ArrayList<Entry> getAllEntries(Main parameters) private ArrayList<Entry> getAllEntries(Main parameters)
{ {
Iterator it = parameters.entries.iterator();
ArrayList<Entry> allEntries = new ArrayList<Entry>(); ArrayList<Entry> allEntries = new ArrayList<Entry>();
while (it.hasNext()) for (Entry entry : parameters.entries)
{ addEntries(allEntries, entry);
Entry entry = (Entry) it.next();
addEntries(allEntries, entry);
}
return allEntries; return allEntries;
} }
...@@ -196,13 +191,9 @@ public class Creator ...@@ -196,13 +191,9 @@ public class Creator
writtenItems.add("META-INF/"); //$NON-NLS-1$ writtenItems.add("META-INF/"); //$NON-NLS-1$
writtenItems.add(JarFile.MANIFEST_NAME); writtenItems.add(JarFile.MANIFEST_NAME);
ArrayList allEntries = getAllEntries(parameters); ArrayList<Entry> allEntries = getAllEntries(parameters);
Iterator it = allEntries.iterator(); for (Entry entry : allEntries)
while (it.hasNext()) writeFile(entry.file, entry.name, parameters.verbose);
{
Entry entry = (Entry) it.next();
writeFile(entry.file, entry.name, parameters.verbose);
}
} }
protected Manifest createManifest(Main parameters) protected Manifest createManifest(Main parameters)
......
/* Indexer.java -- add index.list file to jar /* Indexer.java -- add index.list file to jar
Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -46,7 +46,6 @@ import java.io.IOException; ...@@ -46,7 +46,6 @@ import java.io.IOException;
import java.io.OutputStream; import java.io.OutputStream;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedHashSet; import java.util.LinkedHashSet;
import java.util.StringTokenizer; import java.util.StringTokenizer;
import java.util.jar.Attributes; import java.util.jar.Attributes;
...@@ -90,10 +89,9 @@ public class Indexer ...@@ -90,10 +89,9 @@ public class Indexer
result.append(fileName); result.append(fileName);
// Any line ending will do. // Any line ending will do.
result.append('\n'); result.append('\n');
Iterator i = entries.iterator(); for (String s : entries)
while (i.hasNext())
{ {
result.append(i.next()); result.append(s);
result.append('\n'); result.append('\n');
} }
// Paragraph break. // Paragraph break.
......
/* WorkSet.java -- Helper to track what files to work on /* WorkSet.java -- Helper to track what files to work on
Copyright (C) 2006 Free Software Foundation, Inc. Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of GNU Classpath. This file is part of GNU Classpath.
...@@ -40,21 +40,18 @@ package gnu.classpath.tools.jar; ...@@ -40,21 +40,18 @@ package gnu.classpath.tools.jar;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.Iterator;
public class WorkSet public class WorkSet
{ {
private HashSet<String> allItems; private HashSet<String> allItems;
private void initSet(ArrayList entries) private void initSet(ArrayList<Entry> entries)
{ {
if (entries == null || entries.isEmpty()) if (entries == null || entries.isEmpty())
return; return;
allItems = new HashSet<String>(); allItems = new HashSet<String>();
Iterator it = entries.iterator(); for (Entry entry : entries)
while (it.hasNext())
{ {
Entry entry = (Entry) it.next();
int len = entry.name.length(); int len = entry.name.length();
while (len > 0 && entry.name.charAt(len - 1) == '/') while (len > 0 && entry.name.charAt(len - 1) == '/')
--len; --len;
...@@ -63,7 +60,7 @@ public class WorkSet ...@@ -63,7 +60,7 @@ public class WorkSet
} }
} }
public WorkSet(ArrayList entries) public WorkSet(ArrayList<Entry> entries)
{ {
initSet(entries); initSet(entries);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment