On Mon, 10 May 2004, Stas Bekman wrote:
> How about a quick workaround as follows: For windows only,
> link APR.so statically with all APR/Foo.o and the required
> modperl_foo.o and arrange for the bootstrap not to call it
> for windows if APR.so is loaded?
That sounds good ... The only alternative I was able
to come up with is to use LoadLibrary/GetProcAddress
to set a function pointer to that of a function
within a dll. I tried to cut this down to the
minimal needed, and came up with something along
the lines of, generically,
typdef ... /* delare the function pointers */
HINSTANCE hlib;
if (GetProcAddresses(&hlib, "Some.dll",
&fn_1, "func_1",
&fn_2, "func_2",
...) {
/* the functions are available */
}
if (hlib != NULL) FreeLibrary(hlib);
where GetProcAddresses() is a simple (generic) routine that
associates, from Some.dll, func_1, func_2, ... with fn_1,
fn_2, ... So, in this approach, for each APR::* as
appropriate, necessary function pointers must be declared,
GetProcAddresses() is invoked, and finally, if necessary,
FreeLibrary() called at the end.
However, I don't have enough experience with the build
system to compare if the above would be easier or harder to
set up and maintain, compared to linking against the
appropriate .so files.
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]