diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 94a1543ef55..353e6298418 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,8 @@ 2000-02-09 Tom Tromey <tromey@cygnus.com> + * java/lang/natRuntime.cc (_load): Call add_library. + (loadLibraryInternal): Likewise. + * gnu/gcj/convert/natIconv.cc (Input_iconv::finalize): Call iconv_close when handle is not NULL. Thanks to Andrew Haley. (Output_iconv::finalize): Likewise. diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc index d391ff42d6b..f21a81f1050 100644 --- a/libjava/java/lang/natRuntime.cc +++ b/libjava/java/lang/natRuntime.cc @@ -119,6 +119,8 @@ java::lang::Runtime::_load (jstring path, jboolean do_search) _Jv_Throw (new UnsatisfiedLinkError (JvNewStringLatin1 (msg))); } + add_library (h); + void *onload = lt_dlsym (h, "JNI_OnLoad"); if (onload != NULL) { @@ -150,6 +152,8 @@ java::lang::Runtime::loadLibraryInternal (jstring lib) 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;