ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/irc_reslib.c
(Generate patch)

Comparing ircd-hybrid-8/src/irc_reslib.c (file contents):
Revision 1256 by michael, Sun Jan 15 05:58:40 2012 UTC vs.
Revision 1325 by michael, Sat Mar 31 10:29:02 2012 UTC

# Line 84 | Line 84
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 */
# Line 160 | Line 159 | parse_resvconf(void)
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)
# Line 213 | Line 212 | parse_resvconf(void)
212        add_nameserver(arg);
213    }
214  
215 <  fbclose(file);
215 >  fclose(file);
216    return 0;
217   }
218  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)