This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Patch: register all loaded libraries
- To: Java Patch List <java-patches at sourceware dot cygnus dot com>
- Subject: Patch: register all loaded libraries
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 09 Feb 2000 17:15:48 -0700
- Reply-To: tromey at cygnus dot com
I'm checking in the appended patch. It fixes an oversight from an
earlier JNI patch; now all dynamically loaded libraries are correctly
registered.
2000-02-09 Tom Tromey <tromey@cygnus.com>
* java/lang/natRuntime.cc (_load): Call add_library.
(loadLibraryInternal): Likewise.
Tom
Index: java/lang/natRuntime.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natRuntime.cc,v
retrieving revision 1.7
diff -u -r1.7 natRuntime.cc
--- natRuntime.cc 2000/02/08 00:26:58 1.7
+++ natRuntime.cc 2000/02/10 00:15:11
@@ -119,6 +119,8 @@
_Jv_Throw (new UnsatisfiedLinkError (JvNewStringLatin1 (msg)));
}
+ add_library (h);
+
void *onload = lt_dlsym (h, "JNI_OnLoad");
if (onload != NULL)
{
@@ -150,6 +152,8 @@
buf[total] = '\0';
// FIXME: make sure path is absolute.
lt_dlhandle h = lt_dlopenext (buf);
+ if (h != NULL)
+ add_library (h);
return h != NULL;
#else
return false;