blob: caff02e737c45dbeadfc8c275c2c5359e5c23f92 (
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
31
32
33
34
35
|
/*
* 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"
#include "krb.h"
#include "krb4int.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#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).)
*/
int
k_gethostname(name, namelen)
char *name;
int namelen;
{
return GETHOSTNAME(name, namelen);
}
|