You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Alexei Kosut <ak...@leland.Stanford.EDU> on 1997/11/16 22:08:06 UTC
some Win32 thoughts
A few random thoughts on the current organization of the Win32 source:
I still don't like the whole dummy.c/main-in-a-DLL thing. For one thing,
it precludes the inclusion of ApacheCore.dll in some other program. A few
months ago, we discussed renaming the Win32 main() function to
apache_main() or something, and changing dummy.c to os/win32/main.c, which
just called apache_main(). But it was never done. It still makes a lot of
sense to me; anyone else?
Also; http_main.c still confuses the heck out of me. There are two copies
of a fair number of things. I wonder how much trouble it would be to split
the file along the MULTITHREAD #ifdef that spans most of the file, and
create a seperate http_main_mt.c file with the multithreaded/Win32 stuff.
Just some random thoughts, now that I have an NT box to play on again.
-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
Stanford University, Class of 2001
Re: some Win32 thoughts
Posted by Ben Laurie <be...@algroup.co.uk>.
Alexei Kosut wrote:
>
> A few random thoughts on the current organization of the Win32 source:
>
> I still don't like the whole dummy.c/main-in-a-DLL thing. For one thing,
> it precludes the inclusion of ApacheCore.dll in some other program. A few
> months ago, we discussed renaming the Win32 main() function to
> apache_main() or something, and changing dummy.c to os/win32/main.c, which
> just called apache_main(). But it was never done. It still makes a lot of
> sense to me; anyone else?
I think it is cute that you can have main() in a DLL, so I'll experience
a twinge of regret if we move it, but apart from that, I agree, it is a
really stupid thing to do.
> Also; http_main.c still confuses the heck out of me. There are two copies
> of a fair number of things. I wonder how much trouble it would be to split
> the file along the MULTITHREAD #ifdef that spans most of the file, and
> create a seperate http_main_mt.c file with the multithreaded/Win32 stuff.
I'd rather see the two copies merged. Perhaps someone with a big screen
and some spare hours would like to try?
Hmmm ... actually, way back when, there was a tool that would do a
_partial_ preprocess. Run that twice and then diff 'em, then merge 'em
back again. Wonder what it was called?
> Stanford University, Class of 2001
^^^^ cool!
Cheers,
Ben.
--
Ben Laurie |Phone: +44 (181) 735 0686|Apache Group member
Freelance Consultant |Fax: +44 (181) 735 0689|http://www.apache.org
and Technical Director|Email: ben@algroup.co.uk |Apache-SSL author
A.L. Digital Ltd, |http://www.algroup.co.uk/Apache-SSL
London, England. |"Apache: TDG" http://www.ora.com/catalog/apache
Re: some Win32 thoughts
Posted by Dean Gaudet <dg...@arctic.org>.
I'd like to have os/foo/http_main, and anything common between the two
copies put into a common file main/foo.c. The two mains are completely
different, and as we move forward with 2.0 we'll have more process models.
http_main is essentially the process model for apache, at least that's its
main function.
Things like mutexes and shared mem should be split off into other modules
under os/foo and stop using static variables, for example, mod_rewrite
needs mutexes too. There are other needs for shared memory. It screams
"abstraction".
This is something that should be left for 2.0 though in my opinion. I
started weeding my way through http_main once a few weeks ago, but it's
too scary to do now.
Dean
On Sun, 16 Nov 1997, Alexei Kosut wrote:
> A few random thoughts on the current organization of the Win32 source:
>
> I still don't like the whole dummy.c/main-in-a-DLL thing. For one thing,
> it precludes the inclusion of ApacheCore.dll in some other program. A few
> months ago, we discussed renaming the Win32 main() function to
> apache_main() or something, and changing dummy.c to os/win32/main.c, which
> just called apache_main(). But it was never done. It still makes a lot of
> sense to me; anyone else?
>
> Also; http_main.c still confuses the heck out of me. There are two copies
> of a fair number of things. I wonder how much trouble it would be to split
> the file along the MULTITHREAD #ifdef that spans most of the file, and
> create a seperate http_main_mt.c file with the multithreaded/Win32 stuff.
>
> Just some random thoughts, now that I have an NT box to play on again.
>
> -- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
> Stanford University, Class of 2001
>
>
>