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.3 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.4 by schorsch, Mon Jul 14 20:02:29 2003 UTC

# Line 7 | Line 7 | static const char      RCSid[] = "$Id$";
7  
8   #include "copyright.h"
9  
10 < #ifndef BSD
10 > #include <unistd.h>
11  
12 #include  <sys/utsname.h>
13
12   char *
13   myhostname()
14   {
17        static struct utsname   nambuf;
18
19        if (!nambuf.nodename[0])
20                uname(&nambuf);
21        return(nambuf.nodename);
22 }
23
24 #else
25
26 char *
27 myhostname()
28 {
15          static char     hostname[65];
16  
17          if (!hostname[0])
# Line 33 | Line 19 | myhostname()
19          return(hostname);
20   }
21  
36 #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines