httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] TPF util_uri.c
Date Sat, 17 Oct 1998 12:41:07 GMT
Brian Behlendorf wrote:
> 
> This is a comment that applies to this patch and other patches.  It's been
> generally agreed 'round these parts that type casts hide bugs, and thus
> should be avoided.  It's also been generally agreed that OS-specific
> sections should be kept out of the core code, to help keep it simpler.  So
> for example, your changes to GuessOS and ap_config.h are right; changes
> like the below, there should be a better way.
> 
> >+ #ifdef TPF
> >+     struct hostent *hp = gethostbyname((char *)hostname);
> >+ #else
> >      struct hostent *hp = gethostbyname(hostname);
> >+ #endif /* TPF */

In some header:

#ifdef TPF
#define ap_os_gethostbyname(h)	gethostbyname((char *)h)
#else
#define ap_os_gethostbyname(h)	gethostbyname(h)
#endif

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/

WE'RE RECRUITING! http://www.aldigital.co.uk/

Mime
View raw message