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: WWW Form Bug Report: "osf/1 virtualhost support by ip broken" on OSF/1
Date Tue, 12 Nov 1996 21:49:40 GMT
Roy T. Fielding wrote:
> 
> > Well, under bsdi, irix, and linux you can use INADDR_NONE.  Under solaris
> > the man page even says the functions (inet_addr, inet_network) return -1
> > on error (despite returning unsigned long).  Casting -1 to an unsigned
> > long should work on any compiler pretending to be ansi, as should using
> > the constant ~0ul.
> 
> I like ~0ul -- it matches what I'd expect.  I'll commit that.

I don't like that. If the manual says it returns -1 and the type is an
unsigned long, then the correct construction is surely:

(unsigned long)-1

~0ul may happen to be the same, but that ain't what the manual says.

Cheers,

Ben.

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

Mime
View raw message