This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: gethostname question
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Brent Eagles <brent dot eagles at iona dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 27 Mar 2003 21:54:52 +0000
- Subject: Re: [ECOS] gethostname question
- References: <20030327150126.A10046@mail.ooc.nf.ca>
Brent Eagles wrote:
Hi,
I know this has *got* to be a stupid question, but whats the story with
gethostname()? Is it supported? If not, what's the preferred way to
acquire the hostname?
const char my_hostname[] = "foo.bar.com";
#define gethostname() my_hostname
:-)
We should have it for the purposes of porting existing Unix code, but it's
not generally very appropriate for embedded systems which is why no-one's
ever considered it important enough to do.
Jifl
--
eCosCentric http://www.eCosCentric.com/ The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss