>>>> "Andrew" == Andrew Begel
<abegel(a)eecs.berkeley.edu> writes:
Andrew> module-load-path works for finding the dll that
Andrew> load-module() loads, but doesn't handle any dependent DLL
Andrew> libraries that are linked into the dll.
OK.
Andrew> Basically, our project has an XEmacs DLL external module
Andrew> which is dependent on a few DLLs that we provide; but we
Andrew> need to put these DLLs into the PATH so that the dlopen()
Andrew> of the external module DLL succeeds. Otherwise you get a
Andrew> nice dialog box from Windows stating that it couldn't find
Andrew> such-and-such.dll in the PATH.
Isn't this an abuse of PATH searching? PATH searching is intended to
provide a way for applications to find executable code that they
_don't_ provide themselves. But you already know where those DLLs
are, you found the ELL (XEmacs-specific DLL) there, right? This works
fine for XEmacs itself, and has the additional advantage of avoiding
version skew (or breakage of delay-loaded modules) if the user should
do something like manipulate PATH themselves.
Or the ELL could just call the platform's setenv(3) itself. This has
its own problems, namely possible name conflicts for other ELLs that
abuse PATH searching in the same way. But since you're changing the
fundamental assumption that XEmacs makes about `process-environment'
anyway, why not? This has the advantage from my point of view that
_all_ non-module XEmacs functionality will work the same way it ever
did, because your PATH-munging will be totally ignored by XEmacs.
Andrew> We could modify setenv to take an optional boolean arg
Andrew> that would indicate whether this change affects the Xemacs
Andrew> process, or just subprocesses.
I don't much like this off-hand. It will be another gratuitous API
incompatibility with GNU Emacs. What's wrong with just defining new
primitive functions, say `{get,set}-real-environment', and in a module
of their own? Also, why impose the extra path in PATH on subprocesses
etc that just don't care about your DLLs? See above.
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Don't ask how you can "do" free software business;
ask what your business can "do for" free software.