httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@gonzo.ben.algroup.co.uk>
Subject Re: apache-1.1.1/DigitalUnix/gcc-2.7.2
Date Wed, 24 Jul 1996 21:38:56 GMT
Robert S. Thau wrote:
> 
>   This one can be fixed with a union, but one is led to wonder why the "type"
>   isn't just an integer anyway. Anyone got any comments (before I change it to
>   be one)?
> 
> Which type?  The effect of the patch is to change the type of one of the
> arguments from one integral type ('int') to another ('long') precisely to
> avoid a compiler warning...

Sorry. My comment assumed familiarity with the module. "type" is a member of
a structure, and is currently a "char *", for no particularly good reason.
Except, of course, for the usual reason, which is that it is derived from
the catch-all "void *" in command_rec.

The real problem is abusing "void *" to hold integers. Unfortunately, fixing
that would break almost all modules.

In fact, in this particular case, it could be fixed by changing the type of,
erm, "type" to "int". But that would lead to even more casts elsewhere.

The other solution would be to just change the ints to longs as in the patch,
but unconditionally.

Cheers,

Ben.

> 
> rst

-- 
Ben Laurie                  Phone: +44 (181) 994 6435
Freelance Consultant and    Fax:   +44 (181) 994 6472
Technical Director          Email: ben@algroup.co.uk
A.L. Digital Ltd,           URL: http://www.algroup.co.uk
London, England.            Apache Group member (http://www.apache.org)

Mime
View raw message