Commit | Line | Data |
---|---|---|
a300ef85 JB |
1 | /* |
2 | * Copyright (c) 1985 Regents of the University of California. | |
3 | * All rights reserved. The Berkeley software License Agreement | |
4 | * specifies the terms and conditions for redistribution. | |
5 | */ | |
6 | ||
2ce81398 | 7 | #if defined(LIBC_SCCS) && !defined(lint) |
c0f8e4ee | 8 | static char sccsid[] = "@(#)sethostent.c 6.3 (Berkeley) %G%"; |
2ce81398 | 9 | #endif LIBC_SCCS and not lint |
a300ef85 | 10 | |
c0f8e4ee KD |
11 | #include <sys/types.h> |
12 | #include <arpa/nameser.h> | |
13 | #include <netinet/in.h> | |
14 | #include <resolv.h> | |
a300ef85 | 15 | |
158ad942 JB |
16 | sethostent(stayopen) |
17 | { | |
c0f8e4ee KD |
18 | if (stayopen) |
19 | _res.options |= RES_STAYOPEN | RES_USEVC; | |
158ad942 | 20 | } |
a300ef85 | 21 | |
c0f8e4ee KD |
22 | endhostent() |
23 | { | |
24 | _res.options &= ~(RES_STAYOPEN | RES_USEVC); | |
25 | _res_close(); | |
26 | } | |
158ad942 JB |
27 | |
28 | sethostfile(name) | |
29 | char *name; | |
30 | { | |
31 | #ifdef lint | |
32 | name = name; | |
33 | #endif | |
34 | } |