From 84e2bc6b86271e905bb8dd7aebbb1a30fd2c67b4 Mon Sep 17 00:00:00 2001 From: CSRG Date: Fri, 22 Jun 1990 05:10:56 -0800 Subject: [PATCH] BSD 4_3_Reno development Work on file usr/src/kerberosIV/krb/k_gethostname.c Synthesized-from: CSRG/cd2/4.3reno --- usr/src/kerberosIV/krb/k_gethostname.c | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 usr/src/kerberosIV/krb/k_gethostname.c diff --git a/usr/src/kerberosIV/krb/k_gethostname.c b/usr/src/kerberosIV/krb/k_gethostname.c new file mode 100644 index 0000000000..3b07393aad --- /dev/null +++ b/usr/src/kerberosIV/krb/k_gethostname.c @@ -0,0 +1,34 @@ +/* + * $Source: /usr/src/kerberosIV/krb/RCS/k_gethostname.c,v $ + * $Author: kfall $ + * + * Copyright 1987, 1988 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + */ + +#ifndef lint +static char rcsid_k_gethostname_c[] = +"$Header: /usr/src/kerberosIV/krb/RCS/k_gethostname.c,v 4.2 90/06/23 03:10:52 kfall Exp $"; +#endif /* lint */ + +#include + +/* + * 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 gethostname(2).) + * + * Currently defined for BSD 4.2 and PC. The BSD version just calls + * gethostname(); the PC code was taken from "kinit.c", and may or may + * not work. + */ + +k_gethostname(name, namelen) + char *name; + int namelen; +{ + return (gethostname(name, namelen)); +} -- 2.20.1