source: rtems/cpukit/libnetworking/libc/gethostname.c @ 9b4422a2

4.115
Last change on this file since 9b4422a2 was 9b4422a2, checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24

Remove All CVS Id Strings Possible Using a Script

Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines

next to each other after Id string line removed.

+ remove entire comment blocks which only exited to

contain CVS Ids

+ If the processing left a blank line at the top of

a file, it was removed.

  • Property mode set to 100644
File size: 407 bytes
Line 
1#if HAVE_CONFIG_H
2#include "config.h"
3#endif
4
5/*
6 * Solaris doesn't include the gethostname call by default.
7 */
8#include <sys/utsname.h>
9#include <sys/systeminfo.h>
10
11#include <netdb.h>
12
13/*
14 * PUBLIC: #ifndef HAVE_GETHOSTNAME
15 * PUBLIC: int gethostname __P((char *, int));
16 * PUBLIC: #endif
17 */
18int
19gethostname(host, len)
20        char *host;
21        int len;
22{
23        return (sysinfo(SI_HOSTNAME, host, len) == -1 ? -1 : 0);
24}
Note: See TracBrowser for help on using the repository browser.