Commit | Line | Data |
---|---|---|
a300ef85 JB |
1 | /* |
2 | * Copyright (c) 1985 Regents of the University of California. | |
fcd6ac95 KB |
3 | * All rights reserved. |
4 | * | |
269a7923 | 5 | * %sccs.include.redist.c% |
a300ef85 JB |
6 | */ |
7 | ||
2ce81398 | 8 | #if defined(LIBC_SCCS) && !defined(lint) |
3b7e0345 | 9 | static char sccsid[] = "@(#)sethostent.c 6.7 (Berkeley) %G%"; |
fcd6ac95 | 10 | #endif /* LIBC_SCCS and not lint */ |
a300ef85 | 11 | |
c0f8e4ee KD |
12 | #include <sys/types.h> |
13 | #include <arpa/nameser.h> | |
14 | #include <netinet/in.h> | |
15 | #include <resolv.h> | |
a300ef85 | 16 | |
158ad942 JB |
17 | sethostent(stayopen) |
18 | { | |
c0f8e4ee KD |
19 | if (stayopen) |
20 | _res.options |= RES_STAYOPEN | RES_USEVC; | |
158ad942 | 21 | } |
a300ef85 | 22 | |
c0f8e4ee KD |
23 | endhostent() |
24 | { | |
25 | _res.options &= ~(RES_STAYOPEN | RES_USEVC); | |
26 | _res_close(); | |
27 | } |