Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gethostbyname_r



Andrew Gallatin writes:
 > 
 > I'm trying to port something which uses gethostbyname_r()
 > to Darwin.   
 > 
 > On FreeBSD, gethostbyname() is supposted to be thread safe (and uses
 > per-thread storage).  Is the same true for Darwin?
 > 
 > Strangely, I cannot seem to find the source, so I cannot check
 > this out for myself.  The Libc project mentions gethostbyname
 > in CLIB-LIST, sys/CLIB-LIST, and a few man pages, but I
 > can't find the source to it.

Hmm.  I may have found an answer in last week's thread:

The specific routines in the Libinfo project (see Libinfo/  
lookup.subproj/lu_*.c) that maintain thread-specific memory for   
results are: 

<...>
- gethostbyaddr gethostbyname gethostbyname2 gethostent sethostent   
endhostent 


It would be nice if this was documented in the man page..

Drew
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >gethostbyname_r (From: Andrew Gallatin <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.