httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: Apache 1.3b3 compiled with g++, looking for a test suite.
Date Mon, 19 Jan 1998 18:29:30 GMT
Can someone explain to me why you need to compile all the code with C++? 
C++ allows you to mix C and C++ code.  I see no reason for us to do
extensive surgery to the code when you could just put extern "C" into all
the header files and build your own modules with C++. 

I really don't want major surgery done on the code just to support native
C++ compilation unless it actually gains something.  So please explain
what it gains.

I could build modules in Modula 3, Java, or whatever other language has C
linkage abilities.  But I'm not about to go trying to compile the entire
server in Modula-3 or Java. 

On Mon, 19 Jan 1998, Michael Anderson wrote:

> 1. "pool" is used at least 3 ways:
> 	a) struct pool { ... }
> 	b) typedef struct pool pool
> 	c) pool *pool
> 	I changed "struct pool" to "struct POOL",
> 	"typedef struct pool pool" to "typedef struct POOL Pool;",
> 	all possible references of "struct pool" to
> 	Pool, and all types from "pool" to "Pool".

This is unacceptable as it causes changes to all existing modules,
including those not distributed with Apache.  You should change the locals
to "ptr_pool" as suggested, leave the typedef alone, and change the struct
to "struct pool_struct".  But only if extern "C" doesn't help. 

> 2. several functions such as palloc(), get_module_config(), etc.
> needed casts on their return values.

Ugh.  wastage.  I hate this crap, void * is a C construct, I don't care
that C++ totally screws it up.  casts are evil, they hide information. 
Even casts of a void * to (void *) ... suppose down the road someone
changes one of the function paramters or the results (unlikely yes, but it
might happen).  Then you've lost all compiler warnings due to mismatched
pointer types. 

> 3. all uses of "new" as variable names were changed to "newer",
> "delete" was changed to "deleter".
> 4. void pointers (including NULL) used as function arguments
> were cast to the proper types.

more wastage.


View raw message