Re: Gethostname returns incomplete name
Re: Gethostname returns incomplete name
- Subject: Re: Gethostname returns incomplete name
- From: "Justin C. Walker" <email@hidden>
- Date: Tue, 06 Jul 2010 22:25:38 -0700
On Jul 6, 2010, at 22:07 , Laurie Gill wrote:
The following code snippet seems to work on intel but I get mixed
results on
powerpc. Gethostname always returns noErr but sometimes the name I
get back
doesn't work in gethostbyname. Result: Host is nil and h_errno is 1.
gethostname() just returns whatever was previously set by
sethostname() (which is not a Posix call, AFAIK). Whether it returns
something sensible is up to the last caller :-}.
Justin
--
Justin C. Walker
Curmudgeon at Large
Director
Institute for the Enhancement of the Director's Income
--
Build a man a fire and he'll be warm
for a night.
Set a man on fire and he'll be warm
for the rest of his life.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden