Commit cb7d9f67 by Anthony Green Committed by Anthony Green

Look for lib-gnu-pkg-quux.so, not gnu-pkg-quux.so.

From-SVN: r45115
parent 85f3e748
2001-08-21 Anthony Green <green@redhat.com>
* java/lang/natClassLoader.cc (findClass): Search for
lib-gnu-pkg-quux.so, not gnu-pkg-quux.so.
2001-08-21 Jeff Sturm <jsturm@one-point.com> 2001-08-21 Jeff Sturm <jsturm@one-point.com>
* java/util/IdentityHashMap.java (get): Fix off-by-one error. * java/util/IdentityHashMap.java (get): Fix off-by-one error.
......
...@@ -35,6 +35,7 @@ details. */ ...@@ -35,6 +35,7 @@ details. */
#include <java/lang/IncompatibleClassChangeError.h> #include <java/lang/IncompatibleClassChangeError.h>
#include <java/lang/reflect/Modifier.h> #include <java/lang/reflect/Modifier.h>
#include <java/lang/Runtime.h> #include <java/lang/Runtime.h>
#include <java/lang/StringBuffer.h>
#include <java/io/Serializable.h> #include <java/io/Serializable.h>
#include <java/lang/Cloneable.h> #include <java/lang/Cloneable.h>
...@@ -184,11 +185,12 @@ gnu::gcj::runtime::VMClassLoader::findClass (jstring name) ...@@ -184,11 +185,12 @@ gnu::gcj::runtime::VMClassLoader::findClass (jstring name)
if (! klass) if (! klass)
{ {
// Turn `gnu.pkg.quux' into `gnu-pkg-quux'. Then search for a // Turn `gnu.pkg.quux' into `lib-gnu-pkg-quux'. Then search for
// module named (eg, on Linux) `gnu-pkg-quux.so', followed by // a module named (eg, on Linux) `lib-gnu-pkg-quux.so', followed
// `gnu-pkg.so' and `gnu.so'. If loading one of these causes // by `lib-gnu-pkg.so' and `lib-gnu.so'. If loading one of
// the class to appear in the cache, then use it. // these causes the class to appear in the cache, then use it.
jstring so_base_name = name->replace ('.', '-'); java::lang::StringBuffer *sb = new java::lang::StringBuffer (JvNewStringLatin1("lib-"));
jstring so_base_name = (sb->append (name)->toString ())->replace ('.', '-');
while (! klass && so_base_name && so_base_name->length() > 0) while (! klass && so_base_name && so_base_name->length() > 0)
{ {
......
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