summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-08 21:26:25 +0000
committerfitzsim <fitzsim@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-08 21:26:25 +0000
commit3489ccdefe77c8e8203baedbabbd5a252ab92079 (patch)
tree23efeaa3b51fe2f4b34adcdfb70e455d8e516974 /libjava
parent8a991bcf573b77568b9b6f10ddb553817eb71a1e (diff)
downloadgcc-3489ccdefe77c8e8203baedbabbd5a252ab92079.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104044 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog11
-rw-r--r--libjava/gnu/classpath/natSystemProperties.cc4
-rw-r--r--libjava/include/java-props.h3
-rw-r--r--libjava/java/lang/natRuntime.cc2
4 files changed, 19 insertions, 1 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index b8c11d90ee3..832028e6119 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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:
diff --git a/libjava/gnu/classpath/natSystemProperties.cc b/libjava/gnu/classpath/natSystemProperties.cc
index d4f610951af..7e00595c6d7 100644
--- a/libjava/gnu/classpath/natSystemProperties.cc
+++ b/libjava/gnu/classpath/natSystemProperties.cc
@@ -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
diff --git a/libjava/include/java-props.h b/libjava/include/java-props.h
index 43020006e2a..f552e1b54f4 100644
--- a/libjava/include/java-props.h
+++ b/libjava/include/java-props.h
@@ -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
diff --git a/libjava/java/lang/natRuntime.cc b/libjava/java/lang/natRuntime.cc
index 3df5cdd4d11..300dc573247 100644
--- a/libjava/java/lang/natRuntime.cc
+++ b/libjava/java/lang/natRuntime.cc
@@ -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