You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by tr...@livesoftware.com on 1999/02/17 21:16:39 UTC

version info at runtime

Is there a way for my DSO module to obtain apache's version numbers at
runtime?  I'm trying to overcome the highly annoying fact that 1.3.2/3
and 1.3.4 modules are incompatible by including two module structs.  I
need to have my DSO work with 1.3.4 and 1.3.2/3 version of apache.

I've got this to work by duplicating a lot of functions but I wouldn't
have to do that if I could determine whether I was running under 1.3.4
or not at runtime.

Specifically everytime my module calls get_module_config, I'd like to
replace it with a call like this (hypothetical):

get_my_module_config( server_rec *s )
{	
	if( apache_build_number > 134 )
		return get_module_config( s->module_config, &my_module134 );

	return get_module_config( s->module_config, &my_module ); 
}

I thought about using the size of the struct to tell but I'd like to
find something cleaner.  Any other ideas on how to solve this problem
would be helpul too.  Thanks,

P.S.

Does anybody else think it woefully poor form to change something as
important as the module struct in a minor version rev?  It seems one
of the most important benefits of DSOs got chucked out the window.

(Sorry if this has been hashed already, I had trouble getting to the
hypermail archive).

--
Tom Reilly
Live Software, Inc
http://www.livesoftware.com

Re: version info at runtime

Posted by Greg Stein <gs...@lyra.org>.
treilly@livesoftware.com wrote:
> Is there a way for my DSO module to obtain apache's version numbers at
> runtime?  I'm trying to overcome the highly annoying fact that 1.3.2/3
> and 1.3.4 modules are incompatible by including two module structs.  I
> need to have my DSO work with 1.3.4 and 1.3.2/3 version of apache.

Dunno. One of the Apache developers should be able to answer.

> ...
> P.S.
> 
> Does anybody else think it woefully poor form to change something as
> important as the module struct in a minor version rev?  It seems one
> of the most important benefits of DSOs got chucked out the window.

It was an accident, a bug. So it goes.... There has been a lot of
discussion on the list on how best to deal with the module structure and
versions and whatnot. I'm not sure whether they decided to leave it as
the 1.3.4 or back it up to the 1.3.2/3 style.

Cheers,
-g

--
Greg Stein, http://www.lyra.org/