Patch: FYI: Re-merge a couple classes
Tom Tromey
tromey@redhat.com
Wed Sep 26 17:18:00 GMT 2001
I'm checking this in.
This re-merges a couple classes with Classpath.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* gnu/classpath/Configuration.java.in (INIT_LOAD_LIBRARY): New
constant.
* java/io/StreamTokenizer.java, java/util/ResourceBundle.java:
Re-merged with Classpath.
Index: gnu/classpath/Configuration.java.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/gnu/classpath/Configuration.java.in,v
retrieving revision 1.1
diff -u -r1.1 Configuration.java.in
--- gnu/classpath/Configuration.java.in 2000/11/26 01:48:04 1.1
+++ gnu/classpath/Configuration.java.in 2001/09/27 00:15:16
@@ -1,14 +1,43 @@
-// This file defines compile-time constants that can be accessed by java code.
-// It is pre-processed by configure.
+/* gnu.classpath.Configuration
+ Copyright (C) 1998, 2001 Free Software Foundation, Inc.
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+As a special exception, if you link this library with other files to
+produce an executable, this library does not by itself cause the
+resulting executable to be covered by the GNU General Public License.
+This exception does not however invalidate any other reasons why the
+executable file might be covered by the GNU General Public License. */
+
package gnu.classpath;
+/**
+ * This file defines compile-time constants that can be accessed by
+ * java code. It is pre-processed by configure.
+ */
public interface Configuration
{
// The value of DEBUG is substituted according to whether the
// "--enable-libgcj-debug" argument was passed to configure. Code
// which is made conditional based on the value of this flag will
// be removed by the optimizer in a non-debug build.
-
boolean DEBUG = @LIBGCJDEBUG@;
+
+ // For libgcj we never load the JNI libraries.
+ boolean INIT_LOAD_LIBRARY = false;
}
Index: java/io/StreamTokenizer.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/io/StreamTokenizer.java,v
retrieving revision 1.9
diff -u -r1.9 StreamTokenizer.java
--- java/io/StreamTokenizer.java 2001/02/17 13:59:12 1.9
+++ java/io/StreamTokenizer.java 2001/09/27 00:15:17
@@ -407,7 +407,7 @@
ttype = TT_WORD;
sval = tokbuf.toString();
if (lowerCase)
- sval.toLowerCase();
+ sval = sval.toLowerCase();
}
else if (isComment(ch))
{
Index: java/util/ResourceBundle.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/util/ResourceBundle.java,v
retrieving revision 1.14
diff -u -r1.14 ResourceBundle.java
--- java/util/ResourceBundle.java 2001/09/07 18:14:20 1.14
+++ java/util/ResourceBundle.java 2001/09/27 00:15:17
@@ -28,6 +28,7 @@
package java.util;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
+import gnu.classpath.Configuration;
/**
* A resource bundle contains locale-specific data. If you need
@@ -73,6 +74,14 @@
* @author Jochen Hoenicke */
public abstract class ResourceBundle
{
+ static
+ {
+ if (Configuration.INIT_LOAD_LIBRARY)
+ {
+ System.loadLibrary ("javautil");
+ }
+ }
+
/**
* The parent bundle. This is consulted when you call getObject
* and there is no such resource in the current bundle. This
More information about the Java-patches
mailing list