Received: (from majordom@localhost) by hyperreal.com (8.8.4/8.8.4) id RAA18534; Tue, 8 Apr 1997 17:34:53 -0700 (PDT) Received: from bilge-gw.topsail.org (bilge-gw.topsail.org [207.8.162.150]) by hyperreal.com (8.8.4/8.8.4) with ESMTP id RAA18454 for ; Tue, 8 Apr 1997 17:34:45 -0700 (PDT) Received: from argo.topsail.org ([172.16.86.5]) by bilge-gw.topsail.org (8.8.5/8.7.3) with ESMTP id UAA06892 for ; Tue, 8 Apr 1997 20:34:41 -0400 (EDT) Message-ID: <334AE420.30D55EB7@topsail.org> Date: Tue, 08 Apr 1997 20:34:40 -0400 From: Chuck Murcko Organization: The Topsail Group X-Mailer: Mozilla 4.0b3C (X11; I; FreeBSD 2.1.7-RELEASE i386) MIME-Version: 1.0 To: new-httpd@apache.org Subject: Re: conf.h and httpd.h and proxy module X-Priority: 3 (Normal) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org Marc Slemko wrote: > > 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. Oh, OK. Mod_proxy.h does a) expose the lack of a suitable includes hierarchy, and b) gives files in the proxy directory access to a LCD (minimum) of what they need to know about the base source. You'll notice that specific proxy files also have individual includes needs, and deal with those separately, and I will add a comment which states these things to mod_proxy.h. Funny thing, Marc. This was only an issue for me when I moved mod_proxy.c to its own subdir, and split it up into functional parts. Doug MacEachern of mod_proxy has also dealt with this stuff, and Ken now also has some knowledge of it due to writing mod_example. Thanks for noticing that things aren't totally neat and clean about this (seriously) because it'll be a Good Thing to remember when we build 2.0. #Including conf.h in httpd.h wasn't such a big deal when everything about Apache lived in one subdirectory. I'm just dealing with that legacy as best and coherently as I can until we go for 2.0, rather than requiring massive changes to the base code and other modules (the latter actually should be under the src/modules directory for 2.0, anyway). -- chuck Chuck Murcko The Topsail Group, West Chester PA USA chuck@topsail.org