ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/myhostname.c
(Generate patch)

Comparing ray/src/common/myhostname.c (file contents):
Revision 2.1 by greg, Wed Feb 7 16:36:09 1996 UTC vs.
Revision 2.4 by schorsch, Mon Jul 14 20:02:29 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1996 Regents of the University of California */
2
1   #ifndef lint
2 < static char SCCSid[] = "$SunId$ LBL";
2 > static const char       RCSid[] = "$Id$";
3   #endif
6
4   /*
5   * Query system for host name
6   */
7  
8 < #ifndef BSD
8 > #include "copyright.h"
9  
10 < #include  <sys/utsname.h>
10 > #include <unistd.h>
11  
12   char *
13   myhostname()
14   {
18        static struct utsname   nambuf;
19
20        if (!nambuf.nodename[0])
21                uname(&nambuf);
22        return(nambuf.nodename);
23 }
24
25 #else
26
27 char *
28 myhostname()
29 {
15          static char     hostname[65];
16  
17          if (!hostname[0])
# Line 34 | Line 19 | myhostname()
19          return(hostname);
20   }
21  
37 #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines