re PR libgcj/23761 (java.library.path doesn't affect module loading path)
authorThomas Fitzsimmons <fitzsim@redhat.com>
Thu, 8 Sep 2005 21:26:25 +0000 (21:26 +0000)
committerThomas Fitzsimmons <fitzsim@gcc.gnu.org>
Thu, 8 Sep 2005 21:26:25 +0000 (21:26 +0000)
2005-09-08  Thomas Fitzsimmons  <fitzsim@redhat.com>

PR libgcj/23761
* include/java-props.h (_Jv_Module_Load_Path): Declare variable.
* java/lang/natRuntime.cc (init): Call lt_dlsetsearchpath after
lt_dlinit.
* gnu/classpath/natSystemProperties.cc (_Jv_Module_Load_Path):
Define variable.
(_Jv_SetDLLSearchPath): Do not call lt_dlsetsearchpath.  Set
_Jv_Module_Load_Path.

From-SVN: r104044

libjava/ChangeLog
libjava/gnu/classpath/natSystemProperties.cc
libjava/include/java-props.h
libjava/java/lang/natRuntime.cc

index b8c11d90ee391167bcb652f04665b91b2d434620..832028e6119453f52963d6acf6327335b29c4615 100644 (file)
@@ -1,3 +1,14 @@
+2005-09-08  Thomas Fitzsimmons  <fitzsim@redhat.com>
+
+       PR libgcj/23761
+       * include/java-props.h (_Jv_Module_Load_Path): Declare variable.
+       * java/lang/natRuntime.cc (init): Call lt_dlsetsearchpath after
+       lt_dlinit.
+       * gnu/classpath/natSystemProperties.cc (_Jv_Module_Load_Path):
+       Define variable.
+       (_Jv_SetDLLSearchPath): Do not call lt_dlsetsearchpath.  Set
+       _Jv_Module_Load_Path.
+
 2005-09-06  Tom Tromey  <tromey@redhat.com>
 
        PR libgcj/23739:
index d4f610951afbe2cde7a8feca83e2e88a5b74c20a..7e00595c6d7199d237626febff1190e50caba4b1 100644 (file)
@@ -38,13 +38,15 @@ details.  */
 #include <java/lang/String.h>
 #include <jni.h>
 
+char *_Jv_Module_Load_Path = NULL;
+
 #ifdef USE_LTDL
 #include <ltdl.h>
 
 void
 _Jv_SetDLLSearchPath (const char *path)
 {
-  lt_dlsetsearchpath (path);
+  _Jv_Module_Load_Path = strdup (path);
 }
 
 #else
index 43020006e2a811e3f07bc01599e3dc5992eda7c2..f552e1b54f435a43d748ad05e97add51bc97288c 100644 (file)
@@ -26,5 +26,8 @@ extern int _Jv_Properties_Count;
 // Properties taken from the user's environment.
 extern property_pair *_Jv_Environment_Properties;
 
+// Module load path.
+extern char *_Jv_Module_Load_Path;
+
 #endif
 
index 3df5cdd4d11fd0614af051ff86f56d6fb99bc035..300dc573247accb2131f6cf32dc116fef9ef76a7 100644 (file)
@@ -242,6 +242,8 @@ java::lang::Runtime::init (void)
 {
 #ifdef USE_LTDL
   lt_dlinit ();
+  // Set module load path.
+  lt_dlsetsearchpath (_Jv_Module_Load_Path);
   // Make sure self is opened.
   lt_dlopen (NULL);
 #endif