natRuntime.cc (_load): Call add_library.

* java/lang/natRuntime.cc (_load): Call add_library.
	(loadLibraryInternal): Likewise.

From-SVN: r31877
This commit is contained in:
Tom Tromey 2000-02-10 00:17:10 +00:00 committed by Tom Tromey
parent c56c8c43b9
commit 7e3b6e312a
2 changed files with 7 additions and 0 deletions

View File

@ -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.

View File

@ -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;