apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@rkbloom.net
Subject Re: apr_dso_load
Date Thu, 25 Mar 2004 12:47:05 GMT
Quoting "Marc M. Adkins" <Software@Doorways.org>:

> I was working with APR on Windows a half-year ago and used apr_dso_load() a 
> fair amount.  I could have sworn that the load functionality followed the 
> PATH environment variable setting when loading modules.  I could easily be 
> wrong about that, and I've not got a loaded Windows system around right now.
> Since then I've moved completely over to Linux and I'm attempting to pick up
> that old code and move on with it.  I'm trying to figure out how to get my 
> modules to load and the unix variant of apr_dso_load() is using 
> NSLinkModule() (shades of Great NextStep's Ghost?) which apparently (?) 
> doesn't follow the *nix convention (?) of following LD_LIBRARY_PATH.
> So...the apr_dso_load() documentation isn't really clear on this.  Is there /
> should there be a path for apr_dso_load() to follow?  Do I misremember the 
> Windows behavior?

Well, the first thing to remember is that we use native functions on all
platforms.  So, we should follow the conventions for whatever platform you are
on.  On Linux, you shouldn't be using NSLinkModule, you should be using dlopen.
 What distribution of Linux are you using?  To determine exactly which dso path
you are using, check include/arch/unix/apr_private.h for DSO_USE.  On Linux, the
DSO_USE_DLFCN macro should be the one that is defined, which means you are using
dlopen.  According to the dlopen man page, it should be looking through
LD_LIBRARY_PATH for libraries, which is the behavior I remember.


View raw message