Re: getting fqdn from gethostname on a hamm box

1998-08-26 Thread Adrian Bridgett
On Tue, Aug 25, 1998 at 03:06:09PM -0700, Alan Su wrote: > when i call gethostname() on my hamm, it returns only the name of the > machine, rather than a fqdn. i distinctly remember that when i was > running bo, i got a fqdn. does anyone know how i can make it return > the fqdn? or is there anot

Re: getting fqdn from gethostname on a hamm box

1998-08-26 Thread Martin Schulze
Alan Su wrote: > now my question is this: how does one tell how many aliases are in > the h_aliases vector? do i just keep examining the elements of the > vector until one of them is null? I believe the same rule like simple strings apply here, too. The last element is NULL. You have to test f

Re: getting fqdn from gethostname on a hamm box

1998-08-26 Thread Alan Su
Martin Schulze wrote (Wed, 26 Aug 1998 02:12:58 +0200 ): |>> Martin Schulze wrote (Wed, 26 Aug 1998 01:04:36 +0200 ): |>> |>If you want to write portable programs then you use gethostname() to |>> |>determine the hostname, check for a '.' and if it's not included you |>> |>use gethostbyname() to ge

Re: getting fqdn from gethostname on a hamm box

1998-08-26 Thread Martin Schulze
> Martin Schulze wrote (Wed, 26 Aug 1998 01:04:36 +0200 ): > |>If you want to write portable programs then you use gethostname() to > |>determine the hostname, check for a '.' and if it's not included you > |>use gethostbyname() to get the fqdn. For an example, take a look at > |>the syslogd sourc

Re: getting fqdn from gethostname on a hamm box

1998-08-25 Thread Martin Schulze
Alan Su wrote: > when i call gethostname() on my hamm, it returns only the name of the > machine, rather than a fqdn. i distinctly remember that when i was > running bo, i got a fqdn. does anyone know how i can make it return > the fqdn? or is there another function i should be using? thanks. >

getting fqdn from gethostname on a hamm box

1998-08-25 Thread Alan Su
when i call gethostname() on my hamm, it returns only the name of the machine, rather than a fqdn. i distinctly remember that when i was running bo, i got a fqdn. does anyone know how i can make it return the fqdn? or is there another function i should be using? thanks. (btw, getdomainname() r