Deleted Added
full compact
res_init.c (174226) res_init.c (254700)
1/*
2 * Copyright (c) 1985, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 55 unchanged lines hidden (view full) ---

64 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
65 */
66
67#if defined(LIBC_SCCS) && !defined(lint)
68static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
69static const char rcsid[] = "$Id: res_init.c,v 1.16.18.7 2007/07/09 01:52:58 marka Exp $";
70#endif /* LIBC_SCCS and not lint */
71#include <sys/cdefs.h>
1/*
2 * Copyright (c) 1985, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 55 unchanged lines hidden (view full) ---

64 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
65 */
66
67#if defined(LIBC_SCCS) && !defined(lint)
68static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
69static const char rcsid[] = "$Id: res_init.c,v 1.16.18.7 2007/07/09 01:52:58 marka Exp $";
70#endif /* LIBC_SCCS and not lint */
71#include <sys/cdefs.h>
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_init.c 174226 2007-12-03 15:13:44Z ume $");
72__FBSDID("$FreeBSD: head/lib/libc/resolv/res_init.c 254700 2013-08-23 13:59:47Z jilles $");
73
74#include "port_before.h"
75
76#include "namespace.h"
77
78#include <sys/types.h>
79#include <sys/param.h>
80#include <sys/socket.h>

--- 218 unchanged lines hidden (view full) ---

299 }
300
301#define MATCH(line, name) \
302 (!strncmp(line, name, sizeof(name) - 1) && \
303 (line[sizeof(name) - 1] == ' ' || \
304 line[sizeof(name) - 1] == '\t'))
305
306 nserv = 0;
73
74#include "port_before.h"
75
76#include "namespace.h"
77
78#include <sys/types.h>
79#include <sys/param.h>
80#include <sys/socket.h>

--- 218 unchanged lines hidden (view full) ---

299 }
300
301#define MATCH(line, name) \
302 (!strncmp(line, name, sizeof(name) - 1) && \
303 (line[sizeof(name) - 1] == ' ' || \
304 line[sizeof(name) - 1] == '\t'))
305
306 nserv = 0;
307 if ((fp = fopen(_PATH_RESCONF, "r")) != NULL) {
307 if ((fp = fopen(_PATH_RESCONF, "re")) != NULL) {
308 /* read the config file */
309 while (fgets(buf, sizeof(buf), fp) != NULL) {
310 /* skip comments */
311 if (*buf == ';' || *buf == '#')
312 continue;
313 /* read default domain name */
314 if (MATCH(buf, "domain")) {
315 if (haveenv) /*%< skip if have from environ */

--- 557 unchanged lines hidden ---
308 /* read the config file */
309 while (fgets(buf, sizeof(buf), fp) != NULL) {
310 /* skip comments */
311 if (*buf == ';' || *buf == '#')
312 continue;
313 /* read default domain name */
314 if (MATCH(buf, "domain")) {
315 if (haveenv) /*%< skip if have from environ */

--- 557 unchanged lines hidden ---