httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <ma...@worldgate.com>
Subject Re: conf.h and httpd.h and proxy module
Date Tue, 08 Apr 1997 23:15:19 GMT
On Tue, 8 Apr 1997, Chuck Murcko wrote:

> Jim Jagielski wrote:
> > 
> > Chuck Murcko wrote:
> > >
> > > Marc Slemko wrote:
> > > >
> > > > right now things can include conf.h or httpd.h, but things break if they
> > > > do both.
> > > >
> > > Why is it lame to assume that core .h files should be includable by
> > > other things? Especially conf.h? This sounds like some other side
> > > effect, somehow. That says to me that we're accumulating a list of
> > > gotchas for module writers and others. The regex stuff was an example of
> > > that.
> > >
> > 
> > Scuuze me.... but httpd.h includes conf.h itself.
> > 
> Which is why mod_proxy.h only includes httpd.h. I somehow don't
> understand the problem here. Wrapping headers in #ifdefs is a lame
> exercise for those who don't understand how headers work, who like to
> #include everything that looks relevant, you see it all over Sun code.

mod_proxy.h is a header file for mod_proxy.  That would seem to imply that
it handles things dealing with mod_proxy.  conf.h handles things dealing
with configuration.  httpd.h handles general server things.  Some files
include conf.h.  Some include httpd.h.  It would be reasonable to say that
no file except httpd.h should include conf.h.  If you do that, however,
you should make things actually work that way.

mod_proxy.h, however, is not so clear.  Is mod_proxy.h for things relating
to the proxy or for proxy files to include?  I am uncomfortable relying on
the assumption that mod_proxy.h will always include httpd.h (which
includes conf.h), especially since if it stops doing that it could create
bugs which are difficult to notice.  

The problem is the lack of a clearly defined hierarchy for include files,
mostly mod_proxy.h.  If mod_proxy.h is supposed to give files in the proxy
directory access to all they normally need to know about the entire
server, that should be stated clearly in a comment.


Mime
View raw message