gethostname
extern int gethostname(char *hostName, size_t nameSize);
if (gethostname(hostName, sizeof(hostName)) < 0) {
if (gethostname(hostname, 255) < 0)
gethostname(localhost, 255);
if (gethostname(hostname, MAXHOSTNAMELEN) == 0) {
if (gethostname(hostname, sizeof(hostname)) != B_OK)
if ( gethostname( ghnbuf, sizeof(ghnbuf) ) < 0 )
if (gethostname(localHostName, MAXHOSTNAMELEN + 1) == 0) {
if (gethostname(host, sizeof(host)) != 0)
if (gethostname(hostname, MAXHOSTNAMELEN - 1) < 0)
if (gethostname(hostname, MAXHOSTNAMELEN - 1) < 0)
gethostname (hostname,256);
gethostname(hbuf, sizeof(hbuf));
gethostname(local_host, sizeof(local_host));
(void) gethostname(host_name, sizeof(host_name) - 1);
if (gethostname(domain, sizeof(domain) - 1) < 0)
if (gethostname(domain, sizeof(domain)) == 0 &&
status_t error = gethostname(hostname, sizeof(hostname));
if (gethostname(host, sizeof(host)) < 0 || !host[0])
gethostname(hostname, sizeof(hostname));
gethostname(lhostname, sizeof(lhostname));
gethostname(hostname, sizeof(hostname));
gethostname(lhostname, sizeof(lhostname));
if (gethostname(domain, sizeof(domain) - 1) == 0 &&
if (gethostname(hostName, MAXHOSTNAMELEN) == 0)
gethostname(buf, sizeof(statp->defdname) - 1) == 0 &&
if (gethostname(info->nodename, sizeof(info->nodename)) != 0)