From c9197a91e180703238925902f4ec0203cf2d6da4 Mon Sep 17 00:00:00 2001 From: doko Date: Wed, 22 Oct 2008 18:19:29 +0000 Subject: [PATCH] 2008-10-22 Matthias Klose Import GNU Classpath (libgcj-import-20081021). * Regenerate class and header files. * Regenerate auto* files. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141302 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/ChangeLog | 7 + libjava/classpath/ChangeLog | 91 +++- libjava/classpath/configure | 404 +----------------- libjava/classpath/configure.ac | 11 +- libjava/classpath/java/lang/System.java | 28 +- libjava/classpath/java/lang/ThreadLocal.java | 7 +- libjava/classpath/java/nio/Buffer.java | 3 +- .../java/nio/DirectByteBufferImpl.java | 93 ++-- libjava/classpath/java/nio/IntBuffer.java | 4 +- .../java/nio/ShortViewBufferImpl.java | 6 +- .../lib/java/nio/ShortViewBufferImpl.class | Bin 2972 -> 2980 bytes .../gnu_java_awt_peer_gtk_CairoGraphics2D.c | 5 +- libjava/classpath/tools/Makefile.am | 49 +-- libjava/classpath/tools/Makefile.in | 44 +- .../gnu/classpath/tools/jar/Creator.class | Bin 7304 -> 7259 bytes .../gnu/classpath/tools/jar/Indexer.class | Bin 4240 -> 4278 bytes .../gnu/classpath/tools/jar/WorkSet.class | Bin 1560 -> 1708 bytes .../gnu/classpath/tools/jar/Creator.java | 21 +- .../gnu/classpath/tools/jar/Indexer.java | 8 +- .../gnu/classpath/tools/jar/WorkSet.java | 11 +- 20 files changed, 242 insertions(+), 550 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 7e0bf0bc48c6..7377e625c5cd 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2008-10-22 Matthias Klose + + Import GNU Classpath (libgcj-import-20081021). + + * Regenerate class and header files. + * Regenerate auto* files. + 2008-10-21 Andrew John Hughes * sources.am, Makfile.in: Regenerate. diff --git a/libjava/classpath/ChangeLog b/libjava/classpath/ChangeLog index f9db385f7c1f..3f561a669184 100644 --- a/libjava/classpath/ChangeLog +++ b/libjava/classpath/ChangeLog @@ -5,6 +5,23 @@ * tools/Makefile.am: Use gjdoc_gendir when calling antlr. +2008-10-17 Robert Lougher + + * 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 + + * 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 * configure.ac: @@ -18,7 +35,7 @@ Only build GJDoc parser when both CREATE_GJDOC and CREATE_GJDOC_PARSER are on. - + 2008-10-02 Andrew John Hughes * configure.ac: @@ -32,15 +49,72 @@ * tools/Makefile.am: Support CREATE_GJDOC_PARSER option. +2008-09-29 Matthias Klose + + * m4/ac_prog_antlr.m4: + Check for antlr binary as well. + +2008-09-28 Andrew John Hughes + + * 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 + + * java/lang/System.java (getenv): Reinstate + use of EnvironmentMap as opposed to raw + HashMap. + +2008-09-16 Mario Torre + + * java/lang/System.java (getenv): Fix env entries of the form + key=value=value=value not parsed correctly. + +2008-09-15 Andrew John Hughes + + Reported by: Matthias Klose + * tools/Makefile.am: + Simplify the addition of the ANTLR + JAR file to the classpath. + +2008-09-14 Matthias Klose + + * m4/ac_prog_antlr.m4: + Allow use of runantlr on systems + which have it (Debian/Ubuntu). + 2008-09-14 Andrew John Hughes * examples/Makefile.am: - Check lib directly as well as glibj.zip - for boot classes. + Check lib directly as well as glibj.zip + for boot classes. * m4/acinclude.m4: - Only require the class files to be built - to allow the tools and examples to be built, - not the installation of glibj.zip. + Only require the class files to be built + to allow the tools and examples to be built, + not the installation of glibj.zip. * tools/Makefile.am: Check lib directly as well as glibj.zip for boot classes. @@ -435,7 +509,6 @@ * m4/acinclude.m4 (CLASSPATH_COND_IF): New macro. * configure.ac: Use it. - * configure: Regenerate. * tools/Makefile.am (!CREATE_WRAPPERS): Update comment. 2008-07-12 Andrew John Hughes @@ -1578,10 +1651,6 @@ * javax/management/StandardMBean.java: Fix warnings due to use of generics. -2008-06-18 Ralf Wildenhues - - * native/fdlibm/dtoa.c: include stdlib.h, for 'free'. - 2008-06-16 Andrew John Hughes * javax/management/openmbean/ArrayType.java, diff --git a/libjava/classpath/configure b/libjava/classpath/configure index 5907cf809024..fbd88cdc2784 100755 --- a/libjava/classpath/configure +++ b/libjava/classpath/configure @@ -28984,7 +28984,7 @@ fi if test "x${TOOLSDIR}" != x; then - 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 if test "x$JAVAPREFIX" = x; then @@ -29372,7 +29372,7 @@ echo "${ECHO_T}$ac_cv_prog_java_works" >&6 fi - if test "x${COMPILE_GJDOC}" = xyes; then + if test "x${COMPILE_GJDOC}" = xyes; then echo "$as_me:$LINENO: checking for the ANTLR parser generator JAR file" >&5 echo $ECHO_N "checking for the ANTLR parser generator JAR file... $ECHO_C" >&6 @@ -29393,393 +29393,7 @@ echo "$as_me: error: specified ANTLR jar file $ANTLR_JAR not found." >&2;} echo "${ECHO_T}$ANTLR_JAR" >&6 - if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then - if test "x${enable_java_maintainer_mode}" = xyes; then - -if test "x$JAVAPREFIX" = x; then - test "x$JAVA" = x && for ac_prog in cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_JAVA+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$JAVA"; then - ac_cv_prog_JAVA="$JAVA" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_JAVA="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -JAVA=$ac_cv_prog_JAVA -if test -n "$JAVA"; then - echo "$as_me:$LINENO: result: $JAVA" >&5 -echo "${ECHO_T}$JAVA" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$JAVA" && break -done - -else - test "x$JAVA" = x && for ac_prog in cacao$EXEEXT jamvm$EXEEXT kaffe$EXEEXT gij$EXEEXT java$EXEEXT -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_JAVA+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$JAVA"; then - ac_cv_prog_JAVA="$JAVA" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_JAVA="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -JAVA=$ac_cv_prog_JAVA -if test -n "$JAVA"; then - echo "$as_me:$LINENO: result: $JAVA" >&5 -echo "${ECHO_T}$JAVA" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$JAVA" && break -done -test -n "$JAVA" || JAVA="$JAVAPREFIX" - -fi -test "x$JAVA" = x && { { echo "$as_me:$LINENO: error: no acceptable Java virtual machine found in \$PATH" >&5 -echo "$as_me: error: no acceptable Java virtual machine found in \$PATH" >&2;} - { (exit 1); exit 1; }; } - -# Extract the first word of "uudecode$EXEEXT", so it can be a program name with args. -set dummy uudecode$EXEEXT; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_uudecode+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$uudecode"; then - ac_cv_prog_uudecode="$uudecode" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_uudecode="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -uudecode=$ac_cv_prog_uudecode -if test -n "$uudecode"; then - echo "$as_me:$LINENO: result: $uudecode" >&5 -echo "${ECHO_T}$uudecode" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test x$uudecode = xyes; then -echo "$as_me:$LINENO: checking if uudecode can decode base 64 file" >&5 -echo $ECHO_N "checking if uudecode can decode base 64 file... $ECHO_C" >&6 -if test "${ac_cv_prog_uudecode_base64+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -cat << \EOF > Test.uue -begin-base64 644 Test.class -yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE -bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51 -bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s -YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG -aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB -AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB -AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ= -==== -EOF -if uudecode$EXEEXT Test.uue; then - ac_cv_prog_uudecode_base64=yes -else - echo "configure: 29543: uudecode had trouble decoding base 64 file 'Test.uue'" >&5 - echo "configure: failed file was:" >&5 - cat Test.uue >&5 - ac_cv_prog_uudecode_base64=no -fi -rm -f Test.uue -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_uudecode_base64" >&5 -echo "${ECHO_T}$ac_cv_prog_uudecode_base64" >&6 -fi -if test x$ac_cv_prog_uudecode_base64 != xyes; then - rm -f Test.class - { echo "$as_me:$LINENO: WARNING: I have to compile Test.class from scratch" >&5 -echo "$as_me: WARNING: I have to compile Test.class from scratch" >&2;} - if test x$ac_cv_prog_javac_works = xno; then - { { echo "$as_me:$LINENO: error: Cannot compile java source. $JAVAC does not work properly" >&5 -echo "$as_me: error: Cannot compile java source. $JAVAC does not work properly" >&2;} - { (exit 1); exit 1; }; } - fi - if test x$ac_cv_prog_javac_works = x; then - -ECJ_OPTS="-warn:-deprecation,serial,unusedImport" -JAVAC_OPTS="-Xlint:unchecked,cast,divzero,empty,finally,overrides" -GCJ_OPTS="-g" -if test "x$JAVAPREFIX" = x; then - test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_JAVAC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$JAVAC"; then - ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_JAVAC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -JAVAC=$ac_cv_prog_JAVAC -if test -n "$JAVAC"; then - echo "$as_me:$LINENO: result: $JAVAC" >&5 -echo "${ECHO_T}$JAVAC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$JAVAC" && break -done - -else - test "x$JAVAC" = x && for ac_prog in "ecj$EXEEXT $ECJ_OPTS" "ecj-3.3$EXEEXT $ECJ_OPTS" "ecj-3.2$EXEEXT $ECJ_OPTS" "javac$EXEEXT $JAVAC_OPTS" "gcj$EXEEXT -C" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_JAVAC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$JAVAC"; then - ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_JAVAC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -JAVAC=$ac_cv_prog_JAVAC -if test -n "$JAVAC"; then - echo "$as_me:$LINENO: result: $JAVAC" >&5 -echo "${ECHO_T}$JAVAC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$JAVAC" && break -done -test -n "$JAVAC" || JAVAC="$JAVAPREFIX" - -fi -test "x$JAVAC" = x && { { echo "$as_me:$LINENO: error: no acceptable Java compiler found in \$PATH" >&5 -echo "$as_me: error: no acceptable Java compiler found in \$PATH" >&2;} - { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking if $JAVAC is a version of gcj" >&5 -echo $ECHO_N "checking if $JAVAC is a version of gcj... $ECHO_C" >&6 -if test "${ac_cv_prog_javac_is_gcj+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -if $JAVAC --version | grep gcj > /dev/null; then - ac_cv_prog_javac_is_gcj=yes; - JAVAC="$JAVAC $GCJ_OPTS"; -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_javac_is_gcj" >&5 -echo "${ECHO_T}$ac_cv_prog_javac_is_gcj" >&6 -JAVAC_IS_GCJ=$ac_cv_prog_javac_is_gcj - - - -if test x"${JAVAC_IS_GCJ}" = xyes; then - GCJ_JAVAC_TRUE= - GCJ_JAVAC_FALSE='#' -else - GCJ_JAVAC_TRUE='#' - GCJ_JAVAC_FALSE= -fi - -if test "$enable_java_maintainer_mode" = yes; then - -echo "$as_me:$LINENO: checking if $JAVAC works" >&5 -echo $ECHO_N "checking if $JAVAC works... $ECHO_C" >&6 -if test "${ac_cv_prog_javac_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -JAVA_TEST=Object.java -CLASS_TEST=Object.class -cat << \EOF > $JAVA_TEST -/* #line 29690 "configure" */ -package java.lang; - -public class Object -{ - static void doStuff() - { - } -} -EOF -if test x$JAVAC_IS_GCJ = xyes; then - CMD="$JAVAC $JAVACFLAGS -fsource=1.5 -ftarget=1.5 $JAVA_TEST" -else - CMD="$JAVAC $JAVACFLAGS -source 1.5 -target 1.5 $JAVA_TEST" -fi -if { ac_try='$CMD' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null 2>&1; then - ac_cv_prog_javac_works=yes -else - { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 -echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} - { (exit 1); exit 1; }; } - echo "configure: failed program was:" >&5 - cat $JAVA_TEST >&5 -fi -rm -f $JAVA_TEST $CLASS_TEST - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_javac_works" >&5 -echo "${ECHO_T}$ac_cv_prog_javac_works" >&6 - -fi - - fi -fi -echo "$as_me:$LINENO: checking if $JAVA works" >&5 -echo $ECHO_N "checking if $JAVA works... $ECHO_C" >&6 -if test "${ac_cv_prog_java_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -JAVA_TEST=Test.java -CLASS_TEST=Test.class -TEST=Test -cat << \EOF > $JAVA_TEST -/* [#]line 29739 "configure" */ -public class Test { -public static void main (String args[]) { - System.exit (0); -} } -EOF -if test x$ac_cv_prog_uudecode_base64 != xyes; then - if { ac_try='$JAVAC $JAVACFLAGS $JAVA_TEST' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && test -s $CLASS_TEST; then - : - else - echo "configure: failed program was:" >&5 - cat $JAVA_TEST >&5 - { { echo "$as_me:$LINENO: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&5 -echo "$as_me: error: The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?)" >&2;} - { (exit 1); exit 1; }; } - fi -fi -if { ac_try='CLASSPATH=.:$CLASSPATH $JAVA $JAVAFLAGS $TEST' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } >/dev/null 2>&1; then - ac_cv_prog_java_works=yes -else - echo "configure: failed program was:" >&5 - cat $JAVA_TEST >&5 - { { echo "$as_me:$LINENO: error: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&5 -echo "$as_me: error: The Java VM $JAVA failed (see config.log, check the CLASSPATH?)" >&2;} - { (exit 1); exit 1; }; } -fi -rm -fr $JAVA_TEST $CLASS_TEST Test.uue - -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_java_works" >&5 -echo "${ECHO_T}$ac_cv_prog_java_works" >&6 - - - + if test "x${REGENERATE_GJDOC_PARSER}" = xyes && test "x${enable_java_maintainer_mode}" = xyes; then if test -n "$ac_tool_prefix"; then for ac_prog in cantlr runantlr antlr @@ -29895,7 +29509,6 @@ echo $ECHO_N "checking for antlr 2.7.1 or better... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $antlr_version_major.$antlr_version_minor.$antlr_version_micro" >&5 echo "${ECHO_T}$antlr_version_major.$antlr_version_minor.$antlr_version_micro" >&6 - fi fi fi fi @@ -30034,7 +29647,7 @@ else JAVA_TEST=Object.java CLASS_TEST=Object.class cat << \EOF > $JAVA_TEST -/* #line 30037 "configure" */ +/* #line 29650 "configure" */ package java.lang; public class Object @@ -30075,7 +29688,7 @@ fi JAVA_TEST=Test.java CLASS_TEST=Test.class cat << \EOF > $JAVA_TEST - /* #line 30078 "configure" */ + /* #line 29691 "configure" */ public class Test { public static void main(String args) @@ -30820,13 +30433,6 @@ echo "$as_me: error: conditional \"GCJ_JAVAC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${GCJ_JAVAC_TRUE}" && test -z "${GCJ_JAVAC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"GCJ_JAVAC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"GCJ_JAVAC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${USE_ESCHER_TRUE}" && test -z "${USE_ESCHER_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"USE_ESCHER\" was never defined. Usually this means the macro was only invoked conditionally." >&5 diff --git a/libjava/classpath/configure.ac b/libjava/classpath/configure.ac index 18311eab50ab..9ff6e03e22fc 100644 --- a/libjava/classpath/configure.ac +++ b/libjava/classpath/configure.ac @@ -1015,18 +1015,17 @@ AM_CONDITIONAL(USE_PREBUILT_GLIBJ_ZIP, test x$use_glibj_zip = xtrue) AC_SUBST(PATH_TO_GLIBJ_ZIP) if test "x${TOOLSDIR}" != x; then + dnl GCJ LOCAL if test "x${COMPILE_WRAPPERS}" = xno && test "x${enable_java_maintainer_mode}" = xyes; then AC_PROG_JAVA fi + dnl END GCJ LOCAL if test "x${COMPILE_GJDOC}" = xyes; then AC_LIB_ANTLR - if test "x${REGENERATE_GJDOC_PARSER}" = xyes; then -dnl GCJ LOCAL - if test "x${enable_java_maintainer_mode}" = xyes; then - AC_PROG_JAVA + dnl GCJ LOCAL + if test "x${REGENERATE_GJDOC_PARSER}" = xyes && test "x${enable_java_maintainer_mode}" = xyes; then + dnl END GCJ LOCAL AC_PROG_ANTLR(2,7,1) - fi -dnl END GCJ LOCAL fi fi fi diff --git a/libjava/classpath/java/lang/System.java b/libjava/classpath/java/lang/System.java index 9fd6bfe12cd9..58b1bbad3d15 100644 --- a/libjava/classpath/java/lang/System.java +++ b/libjava/classpath/java/lang/System.java @@ -546,20 +546,28 @@ public final class System SecurityManager sm = SecurityManager.current; // Be thread-safe. if (sm != null) sm.checkPermission(new RuntimePermission("getenv.*")); + if (environmentMap == null) { - List environ = (List)VMSystem.environ(); Map variables = new EnvironmentMap(); - for (String pair : environ) - { - String[] parts = pair.split("="); - if (parts.length == 2) - variables.put(parts[0], parts[1]); - else - variables.put(parts[0], ""); - } - environmentMap = Collections.unmodifiableMap(variables); + List environ = (List)VMSystem.environ(); + for (String envEntry : environ) + { + // avoid broken and null entries + if (envEntry != null && !envEntry.endsWith("=")) + { + // it's perfectly legal that some entries may be in the form + // key=value=value=value + 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; } diff --git a/libjava/classpath/java/lang/ThreadLocal.java b/libjava/classpath/java/lang/ThreadLocal.java index 14778c65c2ff..1f60a55539ba 100644 --- a/libjava/classpath/java/lang/ThreadLocal.java +++ b/libjava/classpath/java/lang/ThreadLocal.java @@ -90,7 +90,7 @@ public class ThreadLocal * user. Do not expose this to the public. Package visible for use by * 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. @@ -100,7 +100,8 @@ public class ThreadLocal /** * Allocate a new hash. */ - private synchronized int computeNextHash() { + private synchronized int computeNextHash() + { return nextHashBase++ * 6709; } @@ -144,7 +145,7 @@ public class ThreadLocal // Note that we don't have to synchronize, as only this thread will // ever modify the map. T value = (T) map.get(this); - if (value == notFound) + if (value == sentinel) { value = initialValue(); map.set(this, value); diff --git a/libjava/classpath/java/nio/Buffer.java b/libjava/classpath/java/nio/Buffer.java index fce60c88ce29..5dc670255377 100644 --- a/libjava/classpath/java/nio/Buffer.java +++ b/libjava/classpath/java/nio/Buffer.java @@ -56,7 +56,8 @@ public abstract class Buffer * * 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; diff --git a/libjava/classpath/java/nio/DirectByteBufferImpl.java b/libjava/classpath/java/nio/DirectByteBufferImpl.java index 60df3611ac97..939718e9c0f6 100644 --- a/libjava/classpath/java/nio/DirectByteBufferImpl.java +++ b/libjava/classpath/java/nio/DirectByteBufferImpl.java @@ -1,4 +1,4 @@ -/* DirectByteBufferImpl.java -- +/* DirectByteBufferImpl.java -- Copyright (C) 2003, 2004 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -60,8 +60,8 @@ abstract class DirectByteBufferImpl extends ByteBuffer static final class ReadOnly extends DirectByteBufferImpl { ReadOnly(Object owner, Pointer address, - int capacity, int limit, - int position) + int capacity, int limit, + int position) { super(owner, address, capacity, limit, position); } @@ -89,9 +89,14 @@ abstract class DirectByteBufferImpl extends ByteBuffer super(capacity); } + ReadWrite(Pointer address, int capacity) + { + super(address, capacity); + } + ReadWrite(Object owner, Pointer address, - int capacity, int limit, - int position) + int capacity, int limit, + int position) { super(owner, address, capacity, limit, position); } @@ -104,13 +109,20 @@ abstract class DirectByteBufferImpl extends ByteBuffer 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; } + DirectByteBufferImpl(Pointer address, int capacity) + { + super(capacity, capacity, 0, -1, address, null, 0); + this.owner = null; + } + DirectByteBufferImpl(Object owner, Pointer address, - int capacity, int limit, - int position) + int capacity, int limit, + int position) { super(capacity, limit, position, -1, address, null, 0); this.owner = owner; @@ -118,7 +130,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer /** * Allocates a new direct byte buffer. - */ + */ public static ByteBuffer allocate(int capacity) { return new DirectByteBufferImpl.ReadWrite(capacity); @@ -129,7 +141,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer if (owner == this) VMDirectByteBuffer.free(address); } - + public byte get() { checkForUnderflow(); @@ -168,7 +180,7 @@ abstract class DirectByteBufferImpl extends ByteBuffer position(pos + 1); return this; } - + public ByteBuffer put(int index, byte value) { checkIndex(index); @@ -176,24 +188,23 @@ abstract class DirectByteBufferImpl extends ByteBuffer VMDirectByteBuffer.put(address, index, value); return this; } - + public ByteBuffer put (byte[] src, int offset, int length) { checkArraySize (src.length, offset, length); checkForUnderflow (length); - int index = position (); VMDirectByteBuffer.put (address, index, src, offset, length); position (index + length); - + return this; } - + void shiftDown(int dst_offset, int src_offset, int count) { VMDirectByteBuffer.shiftDown(address, dst_offset, src_offset, count); } - + public ByteBuffer compact() { checkIfReadOnly(); @@ -201,15 +212,15 @@ abstract class DirectByteBufferImpl extends ByteBuffer int pos = position(); if (pos > 0) { - int count = remaining(); - VMDirectByteBuffer.shiftDown(address, 0, pos, count); - position(count); - limit(capacity()); + int count = remaining(); + VMDirectByteBuffer.shiftDown(address, 0, pos, count); + position(count); + limit(capacity()); } else { - position(limit()); - limit(capacity()); + position(limit()); + limit(capacity()); } return this; } @@ -244,9 +255,9 @@ abstract class DirectByteBufferImpl extends ByteBuffer if (mark != pos) { - result.position(mark); - result.mark(); - result.position(pos); + result.position(mark); + result.mark(); + result.position(pos); } return result; } @@ -300,18 +311,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer { return ByteBufferHelper.getChar(this, order()); } - + public ByteBuffer putChar(char value) { ByteBufferHelper.putChar(this, value, order()); return this; } - + public char getChar(int index) { return ByteBufferHelper.getChar(this, index, order()); } - + public ByteBuffer putChar(int index, char value) { ByteBufferHelper.putChar(this, index, value, order()); @@ -322,18 +333,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer { return ByteBufferHelper.getShort(this, order()); } - + public ByteBuffer putShort(short value) { ByteBufferHelper.putShort(this, value, order()); return this; } - + public short getShort(int index) { return ByteBufferHelper.getShort(this, index, order()); } - + public ByteBuffer putShort(int index, short value) { ByteBufferHelper.putShort(this, index, value, order()); @@ -344,18 +355,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer { return ByteBufferHelper.getInt(this, order()); } - + public ByteBuffer putInt(int value) { ByteBufferHelper.putInt(this, value, order()); return this; } - + public int getInt(int index) { return ByteBufferHelper.getInt(this, index, order()); } - + public ByteBuffer putInt(int index, int value) { ByteBufferHelper.putInt(this, index, value, order()); @@ -366,18 +377,18 @@ abstract class DirectByteBufferImpl extends ByteBuffer { return ByteBufferHelper.getLong(this, order()); } - + public ByteBuffer putLong(long value) { ByteBufferHelper.putLong(this, value, order()); return this; } - + public long getLong(int index) { return ByteBufferHelper.getLong(this, index, order()); } - + public ByteBuffer putLong(int index, long value) { ByteBufferHelper.putLong(this, index, value, order()); @@ -388,13 +399,13 @@ abstract class DirectByteBufferImpl extends ByteBuffer { return ByteBufferHelper.getFloat(this, order()); } - + public ByteBuffer putFloat(float value) { ByteBufferHelper.putFloat(this, value, order()); return this; } - + public float getFloat(int index) { return ByteBufferHelper.getFloat(this, index, order()); @@ -416,12 +427,12 @@ abstract class DirectByteBufferImpl extends ByteBuffer ByteBufferHelper.putDouble(this, value, order()); return this; } - + public double getDouble(int index) { return ByteBufferHelper.getDouble(this, index, order()); } - + public ByteBuffer putDouble(int index, double value) { ByteBufferHelper.putDouble(this, index, value, order()); diff --git a/libjava/classpath/java/nio/IntBuffer.java b/libjava/classpath/java/nio/IntBuffer.java index 9234c33ef6dc..dd50be84611c 100644 --- a/libjava/classpath/java/nio/IntBuffer.java +++ b/libjava/classpath/java/nio/IntBuffer.java @@ -50,8 +50,8 @@ public abstract class IntBuffer extends Buffer final int array_offset; final int[] backing_buffer; - IntBuffer (int capacity, int limit, int position, int mark, RawData address, - int[] backing_buffer, int array_offset) + IntBuffer (int capacity, int limit, int position, int mark, + RawData address, int[] backing_buffer, int array_offset) { super (capacity, limit, position, mark, address); this.backing_buffer = backing_buffer; diff --git a/libjava/classpath/java/nio/ShortViewBufferImpl.java b/libjava/classpath/java/nio/ShortViewBufferImpl.java index 3c7c77478029..627085556f65 100644 --- a/libjava/classpath/java/nio/ShortViewBufferImpl.java +++ b/libjava/classpath/java/nio/ShortViewBufferImpl.java @@ -49,7 +49,8 @@ final class ShortViewBufferImpl extends ShortBuffer ShortViewBufferImpl (ByteBuffer bb, int capacity) { 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.offset = bb.position(); this.readOnly = bb.isReadOnly(); @@ -61,7 +62,8 @@ final class ShortViewBufferImpl extends ShortBuffer boolean readOnly, ByteOrder endian) { 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.offset = offset; this.readOnly = readOnly; diff --git a/libjava/classpath/lib/java/nio/ShortViewBufferImpl.class b/libjava/classpath/lib/java/nio/ShortViewBufferImpl.class index 76e3467f0831d046d1bf2a0326b786daa9fa2b35..04aed15b51120fead3d33deca226beff3991b830 100644 GIT binary patch delta 267 zc-k$Fxk>|J6h_Zq{F%v&gNlY2G+-2q1Qa3eOmK-?rQp&k0f`%EBT)-usyK~HyoG`R z5!6B(pTf>Z@g2N{<@a&Eb8j>Gn*6F-^C*{gwZ9J+$kW0I-Hg)97z2zm$b_az3QWnb z&6^*|#Fqc*8CscDdQR!0((~k4V3`J3(3dUG4X@ z-%RETr6--mUz0kZ!%}+>|pEK`L^h5Khx#tf*Lp7xU delta 255 zc-k$Fxk>|J6h_Zq{F!9NK}16g7?&c2LO@B33KQZM6a?4a5Qqvcjkpxb*hCRrGH|s~ z!6qOIfxL!|@8TPH3%kqV`_6Y;skc-owB|{!?Ap*E4v?pd0>ey_rAUq`y{0KKBfmCp zz9k!5{!f%APnw)2h1;$y_PDP^Fm%ol>gEX6ruq8`Q)l}ufsrz;1JIZ&J?@52W zW)JD(NW%DQ=2*Qa^l+-SGqs%)a6yGjRtcq;*!LUsa!rOC-E2rZage@K-#so5`pqLr knv4=@w<#0uwt1GwEtwbjaRc)%o>w+4S@8n%DYxFhAAXKA!~g&Q diff --git a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c index 2689e37c21ff..444c77896260 100644 --- a/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c +++ b/libjava/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c @@ -1,5 +1,5 @@ /* 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. @@ -371,8 +371,9 @@ Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector cairo_font_face_destroy (ft); pango_fc_font_unlock_face(font); } - gdk_threads_leave(); + gdk_threads_leave(); + (*env)->ReleaseLongArrayElements (env, java_fontset, fonts, 0); g_free(glyphs); } diff --git a/libjava/classpath/tools/Makefile.am b/libjava/classpath/tools/Makefile.am index 01c07ee96467..ad88b1c5d24a 100755 --- a/libjava/classpath/tools/Makefile.am +++ b/libjava/classpath/tools/Makefile.am @@ -1,5 +1,16 @@ ## 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. GLIBJ_BOOTCLASSPATH='$(top_srcdir)/lib' GLIBJ_CLASSPATH=.:$(srcdir)/asm:$(ANTLR_CLASSPATH) @@ -12,17 +23,6 @@ else JCOMPILER = $(JAVAC) $(JAVACFLAGS) -source 1.5 -target 1.5 -encoding UTF-8 -bootclasspath $(GLIBJ_BOOTCLASSPATH) -classpath $(GLIBJ_CLASSPATH) 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 bin_SCRIPTS = bin_PROGRAMS = gappletviewer gjarsigner gkeytool \ @@ -320,8 +320,19 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES) ## GCJ LOCAL: put classes in srcdir ## @rm -rf 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. 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 \ $(srcdir)/com/sun/javadoc \ $(srcdir)/com/sun/tools/doclets \ @@ -339,20 +350,8 @@ $(TOOLS_ZIP): $(ALL_TOOLS_FILES) else \ echo -n > vm-tools.lst; \ 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 + cat classes.lst asm.lst vm-tools.lst > all-classes.lst endif ## END GCJ LOCAL ## Copy over tools resource files. @@ -364,8 +363,10 @@ endif echo " cp $(srcdir)/resource/$$p classes/$$p"; \ cp $(srcdir)/resource/$$p classes/$$p; \ done +## BEGIN GCJ LOCAL cp -pR $(srcdir)/asm . cp -pR $(srcdir)/classes . +## END GCJ LOCAL if CREATE_GJDOC ## Copy over gjdoc resource files. for res in $(gjdoc_resources); do \ diff --git a/libjava/classpath/tools/Makefile.in b/libjava/classpath/tools/Makefile.in index cf52853cc328..6a863425b014 100644 --- a/libjava/classpath/tools/Makefile.in +++ b/libjava/classpath/tools/Makefile.in @@ -447,14 +447,14 @@ target_vendor = @target_vendor@ toolexeclibdir = @toolexeclibdir@ uudecode = @uudecode@ 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_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) # 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) -@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@AM_CPPFLAGS = -Wall \ @CREATE_WRAPPERS_TRUE@ -I$(top_srcdir)/include \ @@ -1312,31 +1312,31 @@ dist-hook: # immediately. And copy the template files we use to the classes dir # so they get also included. $(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@ $(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 +@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 -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@ cat classes.lst asm.lst vm-tools.lst > all-classes.lst @list=`cd $(srcdir)/resource && find gnu/classpath/tools com/sun/tools/javac \ sun/rmi/rmic $(GJDOC_EX) -name \*.properties -print -o -name \*.jav -print`; \ for p in $$list; do \ diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Creator.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Creator.class index cd3602b366fe066407f34b43869776e18b23967d..517fe0c7a3399962ddb14962645ac43f61b43aa4 100644 GIT binary patch delta 1756 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 RJ#FBpa&Hy$O}-Jje*v_NnFRm< diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Indexer.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/Indexer.class index cc51ad435f5f5fad7f0cbdb7a7617efb363c16e0..bea2d0f3df77c2e60334caed069607dd2247f1c9 100644 GIT binary patch delta 1325 zc-lRad2mxz6vls-CV9!rg=(3>J{d|2I;JgYsmcsSXOv>g6x*V6gLzXL`(5isN#a4;D#&iAh;p!D7fQ!arxujbLMRCeBXEP@&c#8-2K zrCGp2yUsVvx0s~{OYCL7L0QYV$?o!%1v;<|ZdT;l9ll(zW(Bv{rZH08YS$Wh*{c*P z-()3gG+u7EXBk8CR&jf!A2IjK25 zBjy5kvu|o1x(xx2$BSX}UEZXg=g4d$)OxwNH^V zI-0CXOpdjO$HtOv@zz8n-{2E_U~urngPKoWWd2lZT`Cz*G?|R%bIligDZ!>#s(fZD z)~4`;3dfh5?B^>N^kMl|Xnc9$SU=w=`qos`j|f-QR+d)Po?kJpq`IoE-bC@8=6inV zS{KY$YPh{a7X~)qqc^A$`PT=s{jH!w`i_V$D()fOX!$MO&0Pb!xz|nHxBB=&cklz9a+k9(=IqF|f@(t3z#9HE6@NGPu` zEf|8Sgssxy7eu-A@T4%&DcAlfi5aqR1KR|GAuCskb{nPckTCWv&q>`8nX+B#OaU;M z=h;C}6=VyI?m*2>Sy#)Z|19u=EZ}jUhP^g>V0w2ClN!5uxwa@=yqQzJG`}u zq2a8YcOBku5c{!fd)VJ7sRIt5b#o}q32;+Y6o$V`lf2~R6-s3~eN<|ZQA!sIA~O&i7bs^x?l6;GG2KP~+@I?h#b*w%d)tSe7 zC*=XFLn|tL$e=S_oVte%9&vbN3XjTIJeKC+8i5CwS5+dC%Z|4kQ`PkqS4qGSnOU%y{ z*&{>oV021&cIo(VyfG4s1`0Gjw}$$A<$Y=Jl`{ZuA~r4&k3^^HjO1&BZ#ZVn_jem` zgyYUIzLVyK6NmO0@8t)@IhDh!uP6;xRg?v*%7;(rJ1RJ?T1Rox;73mF*zYe;YOr;mu^?eLz#i}*+?7LFj6Yy^$&-B~01dO8MR+95- zO|NOBxW7k=2c5u%mX4!N6;_3G@U#GM36nn<%yvOw`=$cG7GiCfBAoSXES7ypz}E-zF-S+Pu4# zex(`NAJ}|UBj=~i*~*bx34LL6G{v_8S5b!P%1(ao6xp0`)b5m4yD0r#Aj}uaJ6}Ye zXm&nJ#J`k_ST1|8O!RLStyiXpe(@PVXNNA2`TfgwDbnPtpzljhTa%S?oP;`m+ UPv^#L{^GP4&QocU#rPZFf5RI=u>b%7 diff --git a/libjava/classpath/tools/classes/gnu/classpath/tools/jar/WorkSet.class b/libjava/classpath/tools/classes/gnu/classpath/tools/jar/WorkSet.class index 44a8e047e73ed63faedb8c5cb7233f7eda2ff064..5e792e60dab944ed0c43d690642dd7a4170a673c 100644 GIT binary patch literal 1708 zc-oy*T~k|C6kR8|Nyz0|K0;zqDy3SRkG8QCD3CyN?gbV+WLi^&ah?~PO5 z{SQu^@#BpbUOH35s54HV>Wu%u-{5ahT<0bQ+Mu2B<$UbD&)#dTv(Nec@1K7Ka1Eb_ z;1d|HTCH@st~<_-?$*+7vsri2+q#|JXxd+t3^xQtU~pUiQcu@)tC}uuZ5w4*pii&Y zbFR^F1R{CQ-Ez%(dR2F7Je3g$m&~fAyDi%gxYQew%^&A1xwdIlGmAVGGA+}kTi|T` z#GxhI)_3!!<7N`;0&}OjviX0bvSPXRF4N1i%5t+}s5pbc5C(|-ltdbaFf5@sD~%m@ zSHK@nY=$r*Fw{dsMFcSouj8yhFe||?dhzRF2)v;ofS@ckrr{jkqH3mV*t*-a1!D2U z2^P7oJ=2f#xDdjGz;Lfu!`pa=94zA@6&iV-;l#ycLU>o;+>#2e;5IuY=6!n?tJK@ z)hEGm>{$AtasG?;Am>Kv8Prr8uRVhDIQa`A_YV;L5u-G{S=hs!D?ede;3+PyU4DW~ zZKP(DJp{i}4x`Fgo^MT|OjE)A{nA>2E1%Yo4+mBh$ zkM}uFdLSkV<~mnXe9F^&8aHT}iO`)tWFEp;qli6^E=j-YW1%Ye7~04pS$ zVC-$&A-zd{va85J;aOEaH=g*Aks6~q@gH#|Sn*{^KI6*ASxp`wpG+NK?HKPFPu!c# zxG4ph%zCHZIzwg17fRaoOQVx-Hm?cM8D26;gyfs`vfuBv04Yo>o?|NX* ZcZwc?oyG=p@YBKoiRYMAP%xQ&^B>GJf;|8L delta 883 zc-m!BNlz3(6#lBaW*V9TW?@)#fKgdyy1`)^_C-X5k$n*yZWEZm7#0JqiQzCF`~##9 ziiz8a#LR^Ro1lr&izXhudGqdX!0~lM@L)RWS5@!T_kHiHmo0oQ)bD>jd;-vnr9Jh; z!-uw3QYs2jte}X&Z@!iN2>}nh3`%-uc;kWbm_ZIlmK69Iy!VrjlF^4odObRt+*zAT z87h1T2$Z6X!QGqQOdI`9{X#w%Dg<0`+whkKf~YiiSzV|aR}_R8eE+cGMru20Y;6l% z#WnK_3-MZp$~{lHdCHW$8q^Df5ix~S<<`-tpuudC0`1okCC>HK=BlygaK=^WXclNe zDO#{bu5 zPRTJ{l5HlFYZAcEv2u7*T7MiCx?tl}Dnz0{?9-h%u z*k0LY*yR#MRXfI*rXOS6R(dA1hyXw&oZ#~b+9oeOtG*yt&&e6tJ#~)xjPBVtW3~_9 z5awBXp<5YD@59Bjx+iL3wl65Xf%^bnT@I3K<7B(`GWS!?Uhr##4wA1>1Nme{32~GX rOC_dh9%oRCSu|jbtekhWh0a(nw8gMM{nEgq7>k5aAkpTY1E2T{10Rx1 diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java index eef31e7e01a2..a6b6112caa1c 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/Creator.java @@ -1,5 +1,5 @@ /* 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. @@ -49,7 +49,6 @@ import java.io.OutputStream; import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.JarOutputStream; @@ -179,13 +178,9 @@ public class Creator private ArrayList getAllEntries(Main parameters) { - Iterator it = parameters.entries.iterator(); ArrayList allEntries = new ArrayList(); - while (it.hasNext()) - { - Entry entry = (Entry) it.next(); - addEntries(allEntries, entry); - } + for (Entry entry : parameters.entries) + addEntries(allEntries, entry); return allEntries; } @@ -196,13 +191,9 @@ public class Creator writtenItems.add("META-INF/"); //$NON-NLS-1$ writtenItems.add(JarFile.MANIFEST_NAME); - ArrayList allEntries = getAllEntries(parameters); - Iterator it = allEntries.iterator(); - while (it.hasNext()) - { - Entry entry = (Entry) it.next(); - writeFile(entry.file, entry.name, parameters.verbose); - } + ArrayList allEntries = getAllEntries(parameters); + for (Entry entry : allEntries) + writeFile(entry.file, entry.name, parameters.verbose); } protected Manifest createManifest(Main parameters) diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java b/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java index 06c5de9fb6d7..217b64405a6f 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/Indexer.java @@ -1,5 +1,5 @@ /* 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. @@ -46,7 +46,6 @@ import java.io.IOException; import java.io.OutputStream; import java.text.MessageFormat; import java.util.Enumeration; -import java.util.Iterator; import java.util.LinkedHashSet; import java.util.StringTokenizer; import java.util.jar.Attributes; @@ -90,10 +89,9 @@ public class Indexer result.append(fileName); // Any line ending will do. result.append('\n'); - Iterator i = entries.iterator(); - while (i.hasNext()) + for (String s : entries) { - result.append(i.next()); + result.append(s); result.append('\n'); } // Paragraph break. diff --git a/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java b/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java index c085516c6f1d..d4b7f1eac02a 100644 --- a/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java +++ b/libjava/classpath/tools/gnu/classpath/tools/jar/WorkSet.java @@ -1,5 +1,5 @@ /* 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. @@ -40,21 +40,18 @@ package gnu.classpath.tools.jar; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; public class WorkSet { private HashSet allItems; - private void initSet(ArrayList entries) + private void initSet(ArrayList entries) { if (entries == null || entries.isEmpty()) return; allItems = new HashSet(); - Iterator it = entries.iterator(); - while (it.hasNext()) + for (Entry entry : entries) { - Entry entry = (Entry) it.next(); int len = entry.name.length(); while (len > 0 && entry.name.charAt(len - 1) == '/') --len; @@ -63,7 +60,7 @@ public class WorkSet } } - public WorkSet(ArrayList entries) + public WorkSet(ArrayList entries) { initSet(entries); } -- 2.47.2