httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <>
Subject Re: [mp2 patch] getting APR to work w/o modperl
Date Sat, 15 May 2004 21:36:56 GMT
On Mon, 10 May 2004, Stas Bekman wrote:

> How about a quick workaround as follows: For windows only,
> link statically with all APR/Foo.o and the required
> modperl_foo.o and arrange for the bootstrap not to call it
> for windows if 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 */

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,

View raw message