--- ray/src/common/myhostname.c 1996/02/07 16:36:09 2.1 +++ ray/src/common/myhostname.c 2003/07/14 20:02:29 2.4 @@ -1,32 +1,17 @@ -/* Copyright (c) 1996 Regents of the University of California */ - #ifndef lint -static char SCCSid[] = "$SunId$ LBL"; +static const char RCSid[] = "$Id: myhostname.c,v 2.4 2003/07/14 20:02:29 schorsch Exp $"; #endif - /* * Query system for host name */ -#ifndef BSD +#include "copyright.h" -#include +#include char * myhostname() { - static struct utsname nambuf; - - if (!nambuf.nodename[0]) - uname(&nambuf); - return(nambuf.nodename); -} - -#else - -char * -myhostname() -{ static char hostname[65]; if (!hostname[0]) @@ -34,4 +19,3 @@ myhostname() return(hostname); } -#endif