• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Gethostname returns incomplete name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Gethostname returns incomplete name (From: Laurie Gill <email@hidden>)

  • Prev by Date: Re: Gethostname returns incomplete name
  • Next by Date: Network stack order of Interface Filter NKEs
  • Previous by thread: Re: Gethostname returns incomplete name
  • Next by thread: Network stack order of Interface Filter NKEs
  • Index(es):
    • Date
    • Thread