httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r293305 - in /httpd/httpd/branches/2.2.x/modules: dav/fs/dbm.c
Date Tue, 04 Oct 2005 12:06:36 GMT
Joe Orton wrote:
> 
> On Tue, Oct 04, 2005 at 11:03:31AM +0100, Colm MacCarthaigh wrote:
> > On Mon, Oct 03, 2005 at 08:38:02AM -0400, Jim Jagielski wrote:
> > > At the very last, if we are "assuming" behavior which is specifically
> > > implementation dependent, then a test during configure time that
> > > ensures sizeof(void *) <= sizeof(long) makes sense.
>  > 
> > > There is no room, IMO, for silent hidden assumptions in httpd.
> > 
> > How about;
> 
> -0.5, benefit is nil.
> 
> I don't think it's a good idea to clutter up configure with checks for 
> hypothetical platforms since the scope is unlimited and the build system 
> is fragile enough already.  We could go through this forever; "hey, will 
> httpd work if sizeof(char) != 1?"  "hmm, doubt it, lets add a configure 
> check for that too" etc.
> 

It is bad coding practise to make assumptions on impl dependent
code, period. Although conversion to/from (void *) to (unsigned long)
is likely safe, it should not be silently assumed with no comments,
etc. And yes, if we started making assumptions on sizeof(char),
say with alignment rules or whatever, then we *should* test that.
Simply saying "Ah, for all systems we care about this is safe
enough" isn't enough. A configure test is cheap insurance.

-- 
=======================================================================
 Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
           "If you can dodge a wrench, you can dodge a ball."

Mime
View raw message