84 |
|
#include "ircd_defs.h" |
85 |
|
#include "irc_res.h" |
86 |
|
#include "irc_reslib.h" |
87 |
– |
#include "fileio.h" |
87 |
|
#include "irc_string.h" |
88 |
|
|
89 |
|
#define NS_TYPE_ELT 0x40 /* EDNS0 extended label type */ |
159 |
|
char *opt; |
160 |
|
char *arg; |
161 |
|
char input[MAXLINE]; |
162 |
< |
FBFILE *file; |
162 |
> |
FILE *file; |
163 |
|
|
164 |
|
/* XXX "/etc/resolv.conf" should be from a define in config.h perhaps |
165 |
|
* for cygwin support etc. this hardcodes it to unix for now -db |
166 |
|
*/ |
167 |
< |
if ((file = fbopen("/etc/resolv.conf", "r")) == NULL) |
167 |
> |
if ((file = fopen("/etc/resolv.conf", "r")) == NULL) |
168 |
|
return -1; |
169 |
|
|
170 |
< |
while (fbgets(input, sizeof(input), file) != NULL) |
170 |
> |
while (fgets(input, sizeof(input), file) != NULL) |
171 |
|
{ |
172 |
|
/* blow away any newline */ |
173 |
|
if ((p = strpbrk(input, "\r\n")) != NULL) |
212 |
|
add_nameserver(arg); |
213 |
|
} |
214 |
|
|
215 |
< |
fbclose(file); |
215 |
> |
fclose(file); |
216 |
|
return 0; |
217 |
|
} |
218 |
|
|