ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/myhostname.c
Revision: 2.5
Committed: Thu Jul 17 09:21:29 2003 UTC (20 years, 9 months ago) by schorsch
Content type: text/plain
Branch: MAIN
Changes since 2.4: +3 -1 lines
Log Message:
Added prototypes and includes from patch by Randolph Fritz.
Added more required includes and reduced other compile warnings.

File Contents

# User Rev Content
1 greg 2.1 #ifndef lint
2 schorsch 2.5 static const char RCSid[] = "$Id: myhostname.c,v 2.4 2003/07/14 20:02:29 schorsch Exp $";
3 greg 2.1 #endif
4     /*
5     * Query system for host name
6 greg 2.2 */
7    
8 greg 2.3 #include "copyright.h"
9 greg 2.1
10 schorsch 2.4 #include <unistd.h>
11 schorsch 2.5
12     #include "rtmisc.h"
13 greg 2.1
14     char *
15     myhostname()
16     {
17     static char hostname[65];
18    
19     if (!hostname[0])
20     gethostname(hostname, sizeof(hostname));
21     return(hostname);
22     }
23