httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sockets.c
Date Tue, 14 Sep 1999 16:53:57 GMT
Dean Gaudet wrote:
> 
> On Sun, 12 Sep 1999, Manoj Kasichainula wrote:
> 
> > On Sun, Sep 12, 1999 at 10:30:46AM -0700, Greg Stein wrote:
> > > inet_ntoa() returns a pointer to a statically allocated buffer.
> > > Shouldn't we make a copy of it?
> >
> > And if this is the case, should we also mutex it?
> 
> please no.  pass in a char * to be filled in with the answer, and
> sprintf("%u.%u.%u.%u") to it or something intelligent like that.  adding a
> mutex here is a waste of performance.  and there's about a zillion
> different platform differences, some of them providing thread-safe
> versions, some not... why make life hard trying to use the platform
> version?

You meant pass a char * and an int and use ap_snprintf, of course :-)

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi

Mime
View raw message