X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/158ad9426338d577d096d402c69f52ed75ebcf1c..fad613b52dda8749b9b9e5493557045b54baf496:/usr/src/lib/libc/net/sethostent.c diff --git a/usr/src/lib/libc/net/sethostent.c b/usr/src/lib/libc/net/sethostent.c index c546350ad5..6888d10df6 100644 --- a/usr/src/lib/libc/net/sethostent.c +++ b/usr/src/lib/libc/net/sethostent.c @@ -1,26 +1,35 @@ /* * Copyright (c) 1985 Regents of the University of California. - * All rights reserved. The Berkeley software License Agreement - * specifies the terms and conditions for redistribution. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that this notice is preserved and that due credit is given + * to the University of California at Berkeley. The name of the University + * may not be used to endorse or promote products derived from this + * software without specific prior written permission. This software + * is provided ``as is'' without express or implied warranty. */ -#ifndef lint -static char sccsid[] = "@(#)sethostent.c 1.2 (Berkeley) %G%"; -#endif not lint +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)sethostent.c 6.4 (Berkeley) %G%"; +#endif /* LIBC_SCCS and not lint */ -/* - * These are dummy routines to allow old programs that used /etc/hosts - * to compile and work with the BIND name server - */ +#include +#include +#include +#include sethostent(stayopen) { -#ifdef lint -stayopen = stayopen; -#endif + if (stayopen) + _res.options |= RES_STAYOPEN | RES_USEVC; } -endhostent() {} +endhostent() +{ + _res.options &= ~(RES_STAYOPEN | RES_USEVC); + _res_close(); +} sethostfile(name) char *name;