httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: Porting c-modules to Apache 1.3
Date Sat, 08 Sep 2001 17:59:29 GMT
On Fri, 7 Sep 2001, Gary Benson wrote:

> 
> Hi guys,
> 
> I've been trying to port some of the c-modules to Apache 1.3, and before I

cool!

> go any further I thought I'd check that I haven't done anything stupid :-)

not at all :)

> Attached to the bottom is my patch to mod_random_chunk; I haven't managed
> to test it fully since my LWP is too old (is 5.5396 a CVS version?) but I
> just wanted to see if anyone has any problems with what I've done to make
> it work? I'm not too familiar with Apache's internals...

_xx versions are not indexed, but you can get it here:
http://www.cpan.org/authors/id/GAAS/
 
> Also, in cmodules_httpd_conf(), in TestConfigC.pm, it is looking for the
> compiled module in "$dir/.libs/$mod->{name}.so", whereas on mine the
> module gets compiled to "$dir/$mod->{name}.so"; is this another Apache 2
> thing? Would this be an appropriate fix:
> 
> my $so = $self->{server}->{rev} == 1 ?
> 	 "$dir/$mod->{name}.so" :
> 	 "$dir/.libs/$mod->{name}.so";

there was already logic in there (cmodules_build_so) to get this right,
but this one was missed.  try with the current cvs.
 
> +#ifdef APACHE1
> +#define AP_METHOD_BIT	1
> +typedef size_t apr_size_t;
> +#endif /* APACHE1 */

i'd rather see:
#ifdef APACHE1
#include "httpd_test_apache1.h"
#endif

or similar, so we don't have to duplicate this stuff in each module.

> +#ifdef APACHE1
> +
> +static const handler_rec random_chunk_handlers[] =
> +{
> +    {"random-chunk", random_chunk_handler},
> +    {NULL}
> +};

would also be nice if we could have a #define macro template for this kind
of stuff, i might give that a shot soonish.



Mime
View raw message