2005-09-08 Thomas Fitzsimmons <fitzsim@redhat.com>
authorfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Sep 2005 21:26:25 +0000 (21:26 +0000)
committerfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Sep 2005 21:26:25 +0000 (21:26 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104044 138bc75d-0d04-0410-961f-82ee72b054a4

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

index b8c11d9..832028e 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 d4f6109..7e00595 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 4302000..f552e1b 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 3df5cdd..300dc57 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