Hello
I'm reading the japhar mailing list, trying to find the patches we
forgot to commit to CVS. I came across this.
[Ian D. Stewart 2000-02-03]
> The method lt_dlopen (which HVM_DllFind() eventually calls) attempts
> to load a specified shared library. However, if it cannot find the
> library, it searches amoung the directories specified in
> LTDT_LIBRARY_PATH, and if it finds a library with the same filename,
> it loads that file. Unfortunately, japhar never reports that a
> different library then the one specified is being loaded.
Instead of changing libltdl/ltdl.c, I believe it should be enough to
just unset the environment variables. Would this patch to the same
thing?
Index: dynamic_loading.c
===================================================================
RCS file: /cvsroot/hungry/java/japhar/arch/dynamic_loading.c,v
retrieving revision 1.52
diff -u -r1.52 dynamic_loading.c
--- dynamic_loading.c 2000/05/25 12:48:52 1.52
+++ dynamic_loading.c 2000/06/03 12:23:41
@@ -315,6 +315,11 @@
PR_EnterMonitor(dll_monitor);
retval = lt_dlinit();
PR_ExitMonitor(dll_monitor);
+
+ /* Turn of libltdl path searching by removing environment variables */
+ unsetenv("LTDL_LIBRARY_PATH");
+ unsetenv("LD_LIBRARY_PATH");
+
return (retval == 0);
}
--
##> Petter Reinholdtsen <## | [EMAIL PROTECTED]
O- <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/ | Go Mozilla, go! Go!