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 1998/04/06 01:26:43 UTC

SHARED_MODULE/IS_MODULE

A few weeks ago, I noted that the Win32 define IS_MODULE really means
the same thing as our Unix define SHARED_MODULE, and I suggested renaming
the former. I've also realized that defining IS_MODULE in the module file
(e.g. mod_status.c) is rather a silly idea, because if someone decided to
include mod_status.c in the Win32 core instead of loading it in as a DLL,
things would go haywire.

In short; I'd like to change all instances of IS_MODULE to SHARED_MODULE,
and move the defines out of the source files and into the .dsp/.mak files
in src/os/win32.

Can anyone think of a reason why this would be a bad idea? IMHO, it should
be done.

-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Re: SHARED_MODULE/IS_MODULE

Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Mon, 6 Apr 1998, Ben Laurie wrote:

> > and move the defines out of the source files and into the .dsp/.mak files
> > in src/os/win32.
> 
> Not so sure about this part - but I suppose it is the only way. The only
> thing I dislike about it is that it makes it hard to know that
> SHARED_MODULE has been defined.

Also, it's what we do with Unix; add a -DSHARED_MODULE to the compiler
line. So it makes sense, in that context. And it does alleviate problems
if someone has a module that can be either in the core or a DLL, since
code changes aren't required.

Ideally, we'd have a Win32 version of Configure, at least for module
makefile generation. (does autoconf run on Windows?)

> I suppose a big comment somewhere explaining would help. 

It should probably be added to the "how to make a DLL module" docs that I
seem to recall writing six or so months ago for 1.3a1.

-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
   Stanford University, Class of 2001 * Apache <http://www.apache.org> *



Re: SHARED_MODULE/IS_MODULE

Posted by Ben Laurie <be...@algroup.co.uk>.
Alexei Kosut wrote:
> 
> A few weeks ago, I noted that the Win32 define IS_MODULE really means
> the same thing as our Unix define SHARED_MODULE, and I suggested renaming
> the former. I've also realized that defining IS_MODULE in the module file
> (e.g. mod_status.c) is rather a silly idea, because if someone decided to
> include mod_status.c in the Win32 core instead of loading it in as a DLL,
> things would go haywire.
> 
> In short; I'd like to change all instances of IS_MODULE to SHARED_MODULE,

+1

> and move the defines out of the source files and into the .dsp/.mak files
> in src/os/win32.

Not so sure about this part - but I suppose it is the only way. The only
thing I dislike about it is that it makes it hard to know that
SHARED_MODULE has been defined.

I suppose a big comment somewhere explaining would help.

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 |
A.L. Digital Ltd,     |Apache-SSL author    http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache