blob: cac202e3fd7fd9448093bce364b50f07e7cf98dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
/*
* gethostname.c
*
* Copyright 1987, 1988 by the Massachusetts Institute of Technology.
*
* For copying and distribution information, please see the file
* <mit-copyright.h>.
*/
#include "mit-copyright.h"
#define DEFINE_SOCKADDR
#include "krb.h"
#ifndef GETHOSTNAME
#define GETHOSTNAME gethostname /* A rather simple default */
#endif
/*
* Return the local host's name in "name", up to "namelen" characters.
* "name" will be null-terminated if "namelen" is big enough.
* The return code is 0 on success, -1 on failure. (The calling
* interface is identical to BSD gethostname(2).)
*/
k_gethostname(name, namelen)
char *name;
int namelen;
{
return GETHOSTNAME(name, namelen);
}
|