[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haiku-commits
Subject:    [haiku-commits] [L] Change in haiku[master]: libnetwork: Remove lcl_sv.cpp.
From:       Gerrit <review () review ! haiku-os ! org>
Date:       2023-08-31 21:40:12
Message-ID: 62cb9e30e011a56dd19f64e8cc85731e1705ce1b-HTML () review ! haiku-os ! org
[Download RAW message or body]

From waddlesplash <waddlesplash@gmail.com>:

waddlesplash has uploaded this change for review. ( \
https://review.haiku-os.org/c/haiku/+/6878?usp=email )


Change subject: libnetwork: Remove lcl_sv.cpp.
......................................................................

libnetwork: Remove lcl_sv.cpp.

This has not been included in the build for years, probably since the
initial NetResolv merge. Services are now returned via the "protocols"
file, and getservent() has no need for these utility functions.
---
M src/system/libnetwork/Jamfile
D src/system/libnetwork/netresolv/defaults/services
D src/system/libnetwork/netresolv/irs/lcl_sv.cpp
3 files changed, 11 insertions(+), 403 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/78/6878/1

diff --git a/src/system/libnetwork/Jamfile b/src/system/libnetwork/Jamfile
index 76d0692..aced5c6 100644
--- a/src/system/libnetwork/Jamfile
+++ b/src/system/libnetwork/Jamfile
@@ -3,9 +3,6 @@
 UsePrivateHeaders libroot net shared ;
 UseHeaders [ FDirName $(HAIKU_TOP) headers compatibility bsd ] : true ;

-local services = [ FGristFiles services ] ;
-SEARCH on $(services) = [ FDirName $(SUBDIR) netresolv defaults ] ;
-
 local architectureObject ;
 for architectureObject in [ MultiArchSubDirSetup ] {
 	on $(architectureObject) {
@@ -27,8 +24,6 @@
 			[ MultiArchDefaultGristFiles libutil.a libbsd.so ]
 			[ TargetLibsupc++ ]
 			;
-
-		AddFileDataAttribute $(libnetwork) : services : string : $(services) ;
 	}
 }

diff --git a/src/system/libnetwork/netresolv/defaults/services \
b/src/system/libnetwork/netresolv/defaults/services deleted file mode 100644
index 6a8cf5e..0000000
--- a/src/system/libnetwork/netresolv/defaults/services
+++ /dev/null
@@ -1,47 +0,0 @@
-# Copyright 2006, Haiku, Inc. All Rights Reserved.
-# Licensed under the terms of the MIT license.
-#
-# This file only includes ports in the well known port range, and
-# is also not complete - it only includes commonly used ports
-# See RFC 1700 for a full list.
-#
-tcpmux		1/tcp
-echo		7/tcp
-echo		7/udp
-discard		9/tcp		sink null
-discard		9/udp		sink null
-daytime		13/tcp
-daytime		13/udp
-ftp-data	20/tcp
-ftp			21/tcp
-ssh			22/tcp
-telnet		23/tcp
-smtp		25/tcp		mail
-time		37/tcp		timserver
-time		37/udp		timserver
-name		42/udp		nameserver
-whois		43/tcp		nicname
-domain		53/tcp
-domain		53/udp
-bootps		67/udp		dhcps
-bootpc		68/udp		dhcpc
-tftp		69/udp
-finger		79/tcp
-http		80/tcp		www www-http
-kerberos	88/tcp		kdc
-kerberos	88/udp		kdc
-pop3		110/tcp
-nntp		119/tcp
-ntp			123/tcp
-ntp			123/udp
-netbios-ns	137/tcp
-netbios-ns	137/udp
-netbios-dgm	138/tcp
-netbios-dgm	138/udp
-netbios-ssn	139/tcp
-netbios-ssn	139/udp
-imap		143/tcp		imap2 imap4
-irc			194/tcp
-ldap		389/tcp
-ldap		389/udp
-https		443/tcp
diff --git a/src/system/libnetwork/netresolv/irs/lcl_sv.cpp \
b/src/system/libnetwork/netresolv/irs/lcl_sv.cpp deleted file mode 100644
index cece2d2..0000000
--- a/src/system/libnetwork/netresolv/irs/lcl_sv.cpp
+++ /dev/null
@@ -1,351 +0,0 @@
-/*
- * Copyright 2006-2009, Haiku, Inc. All Rights Reserved.
- * Distributed under the terms of the MIT License.
- */
-
-/*
- * Copyright (c) 1989, 1993, 1995
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-/*
- * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
- * Portions Copyright (c) 1996-1999 by Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- *
- * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- */
-
-
-#include "port_before.h"
-
-extern "C" {
-// libbind's internal headers aren't C++ safe
-
-#include "irs_p.h"
-#include "lcl_p.h"
-
-#define private private_data
-#include <irs.h>
-#undef private
-
-#include <isc/memcluster.h>
-
-}
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/nameser.h>
-#include <resolv.h>
-
-#include "port_after.h"
-
-#include <errno.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <FindDirectory.h>
-#include <fs_attr.h>
-#include <image.h>
-#include <TypeConstants.h>
-
-
-#define IRS_SV_MAXALIASES	35
-
-struct service_private {
-	FILE*	file;
-	char	line[BUFSIZ + 1];
-	struct servent servent;
-	char*	aliases[IRS_SV_MAXALIASES];
-};
-
-
-static status_t
-find_own_image(image_info* _info)
-{
-	int32 cookie = 0;
-	image_info info;
-	while (get_next_image_info(B_CURRENT_TEAM, &cookie, &info) == B_OK) {
-		if (((addr_t)info.text <= (addr_t)find_own_image
-			&& (addr_t)info.text + (size_t)info.text_size
-					> (addr_t)find_own_image)) {
-			// found us
-			*_info = info;
-			return B_OK;
-		}
-	}
-
-	return B_ENTRY_NOT_FOUND;
-}
-
-
-static char*
-get_next_line(struct service_private* service)
-{
-	if (service->file == NULL)
-		return NULL;
-	return fgets(service->line, BUFSIZ, service->file);
-}
-
-
-//	#pragma mark -
-
-
-static void
-sv_close(struct irs_sv *sv)
-{
-	struct service_private *service = (struct service_private *)sv->private_data;
-
-	if (service->file)
-		fclose(service->file);
-
-	memput(service, sizeof *service);
-	memput(sv, sizeof *sv);
-}
-
-
-static void
-sv_rewind(struct irs_sv *sv)
-{
-	struct service_private *service
-		= (struct service_private *)sv->private_data;
-
-	if (service->file) {
-		if (fseek(service->file, 0L, SEEK_SET) == 0)
-			return;
-		fclose(service->file);
-		service->file = NULL;
-	}
-
-	char path[PATH_MAX];
-	if (find_directory(B_SYSTEM_DATA_DIRECTORY, -1, false, path, sizeof(path))
-			== B_OK) {
-		strlcat(path, "/network/services", sizeof(path));
-
-		if ((service->file = fopen(path, "r")) != NULL) {
-			if (fcntl(fileno(service->file), F_SETFD, FD_CLOEXEC) == 0)
-				return;
-
-			fclose(service->file);
-			service->file = NULL;
-		}
-	}
-
-	// opening the standard file has file has failed, use the attribute
-
-	// find our library image
-	image_info info;
-	if (find_own_image(&info) != B_OK)
-		return;
-
-	// open the library
-	int libraryFD = open(info.name, O_RDONLY);
-	if (libraryFD < 0)
-		return;
-
-	// open the attribute
-	int attrFD = fs_fopen_attr(libraryFD, "services", B_STRING_TYPE, O_RDONLY);
-	close(libraryFD);
-	if (attrFD < 0)
-		return;
-
-	// attach it to a FILE
-	service->file = fdopen(attrFD, "r");
-	if (service->file == NULL) {
-		close(attrFD);
-		return;
-	}
-
-	if (fcntl(fileno(service->file), F_SETFD, FD_CLOEXEC) == 0)
-		return;
-
-	fclose(service->file);
-	service->file = NULL;
-}
-
-
-static struct servent *
-sv_next(struct irs_sv *sv)
-{
-	struct service_private *service = (struct service_private *)sv->private_data;
-	char *p, *cp, **q;
-
-	if (service->file == NULL)
-		sv_rewind(sv);
-
-	if (service->file == NULL)
-		return NULL;
-
-again:
-	if ((p = get_next_line(service)) == NULL)
-		return NULL;
-
-	if (*p == '#')
-		goto again;
-
-	service->servent.s_name = p;
-	while (*p && *p != '\n' && *p != ' ' && *p != '\t' && *p != '#')
-		++p;
-	if (*p == '\0' || *p == '#' || *p == '\n')
-		goto again;
-	*p++ = '\0';
-	while (*p == ' ' || *p == '\t')
-		p++;
-	if (*p == '\0' || *p == '#' || *p == '\n')
-		goto again;
-	service->servent.s_port = htons((u_short)strtol(p, &cp, 10));
-	if (cp == p || (*cp != '/' && *cp != ','))
-		goto again;
-	p = cp + 1;
-	service->servent.s_proto = p;
-
-	q = service->servent.s_aliases = service->aliases;
-
-	while (*p && *p != '\n' && *p != ' ' && *p != '\t' && *p != '#')
-		++p;
-
-	while (*p == ' ' || *p == '\t') {
-		*p++ = '\0';
-		while (*p == ' ' || *p == '\t')
-			++p;
-		if (*p == '\0' || *p == '#' || *p == '\n')
-			break;
-		if (q < &service->aliases[IRS_SV_MAXALIASES - 1])
-			*q++ = p;
-		while (*p && *p != '\n' && *p != ' ' && *p != '\t' && *p != '#')
-			++p;
-	}
-
-	*p = '\0';
-	*q = NULL;
-	return &service->servent;
-}
-
-
-static struct servent *
-sv_byname(struct irs_sv *sv, const char *name, const char *protocol)
-{
-	struct servent *servent;
-
-	sv_rewind(sv);
-
-	while ((servent = sv_next(sv))) {
-		char **alias;
-
-		if (!strcmp(name, servent->s_name))
-			goto gotname;
-		for (alias = servent->s_aliases; *alias; alias++) {
-			if (!strcmp(name, *alias))
-				goto gotname;
-		}
-		continue;
-gotname:
-		if (protocol == NULL || strcmp(servent->s_proto, protocol) == 0)
-			break;
-	}
-	return servent;
-}
-
-
-static struct servent *
-sv_byport(struct irs_sv *sv, int port, const char *protocol)
-{
-	struct servent *servent;
-
-	sv_rewind(sv);
-	while ((servent = sv_next(sv))) {
-		if (servent->s_port != port)
-			continue;
-		if (protocol == NULL || strcmp(servent->s_proto, protocol) == 0)
-			break;
-	}
-	return servent;
-}
-
-
-static void
-sv_minimize(struct irs_sv *sv)
-{
-	struct service_private *service = (struct service_private *)sv->private_data;
-
-	if (service->file != NULL) {
-		fclose(service->file);
-		service->file = NULL;
-	}
-}
-
-
-//	#pragma mark -
-
-
-extern "C" struct irs_sv *
-irs_lcl_sv(struct irs_acc */*acc*/)
-{
-	struct service_private *service;
-	struct irs_sv *sv;
-
-	if ((sv = (irs_sv *)memget(sizeof *sv)) == NULL) {
-		errno = ENOMEM;
-		return NULL;
-	}
-	if ((service = (service_private *)memget(sizeof *service)) == NULL) {
-		memput(sv, sizeof *sv);
-		errno = ENOMEM;
-		return NULL;
-	}
-
-	memset(service, 0, sizeof *service);
-
-	sv->private_data = service;
-	sv->close = sv_close;
-	sv->next = sv_next;
-	sv->byname = sv_byname;
-	sv->byport = sv_byport;
-	sv->rewind = sv_rewind;
-	sv->minimize = sv_minimize;
-	sv->res_get = NULL;
-	sv->res_set = NULL;
-
-	return sv;
-}

--
To view, visit https://review.haiku-os.org/c/haiku/+/6878?usp=email
To unsubscribe, or for help writing mail filters, visit \
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: If18bdd9593463b38a9aaedb7a621d0ddc15530e4
Gerrit-Change-Number: 6878
Gerrit-PatchSet: 1
Gerrit-Owner: waddlesplash <waddlesplash@gmail.com>
Gerrit-MessageType: newchange


[Attachment #3 (text/html)]

<p>waddlesplash has uploaded this change for <strong>review</strong>.</p><p><a \
href="https://review.haiku-os.org/c/haiku/+/6878?usp=email">View Change</a></p><pre \
style="font-family: monospace,monospace; white-space: pre-wrap;">libnetwork: Remove \
lcl_sv.cpp.<br><br>This has not been included in the build for years, probably since \
the<br>initial NetResolv merge. Services are now returned via the \
&quot;protocols&quot;<br>file, and getservent() has no need for these utility \
functions.<br>---<br>M src/system/libnetwork/Jamfile<br>D \
src/system/libnetwork/netresolv/defaults/services<br>D \
src/system/libnetwork/netresolv/irs/lcl_sv.cpp<br>3 files changed, 11 insertions(+), \
403 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; \
white-space: pre-wrap;">git pull ssh://git.haiku-os.org:22/haiku \
refs/changes/78/6878/1</pre><pre style="font-family: monospace,monospace; \
white-space: pre-wrap;"><span>diff --git a/src/system/libnetwork/Jamfile \
b/src/system/libnetwork/Jamfile</span><br><span>index 76d0692..aced5c6 \
100644</span><br><span>--- a/src/system/libnetwork/Jamfile</span><br><span>+++ \
b/src/system/libnetwork/Jamfile</span><br><span>@@ -3,9 +3,6 @@</span><br><span> \
UsePrivateHeaders libroot net shared ;</span><br><span> UseHeaders [ FDirName \
$(HAIKU_TOP) headers compatibility bsd ] : true ;</span><br><span> </span><br><span \
style="color: hsl(0, 100%, 40%);">-local services = [ FGristFiles services ] \
;</span><br><span style="color: hsl(0, 100%, 40%);">-SEARCH on $(services) = [ \
FDirName $(SUBDIR) netresolv defaults ] ;</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span> local architectureObject ;</span><br><span> for \
architectureObject in [ MultiArchSubDirSetup ] {</span><br><span> 	on \
$(architectureObject) {</span><br><span>@@ -27,8 +24,6 @@</span><br><span> 			[ \
MultiArchDefaultGristFiles libutil.a libbsd.so ]</span><br><span> 			[ \
TargetLibsupc++ ]</span><br><span> 			;</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-		AddFileDataAttribute \
$(libnetwork) : services : string : $(services) ;</span><br><span> \
}</span><br><span> }</span><br><span> </span><br><span>diff --git \
a/src/system/libnetwork/netresolv/defaults/services \
b/src/system/libnetwork/netresolv/defaults/services</span><br><span>deleted file mode \
100644</span><br><span>index 6a8cf5e..0000000</span><br><span>--- \
a/src/system/libnetwork/netresolv/defaults/services</span><br><span>+++ \
/dev/null</span><br><span>@@ -1,47 +0,0 @@</span><br><span style="color: hsl(0, 100%, \
40%);">-# Copyright 2006, Haiku, Inc. All Rights Reserved.</span><br><span \
style="color: hsl(0, 100%, 40%);">-# Licensed under the terms of the MIT \
license.</span><br><span style="color: hsl(0, 100%, 40%);">-#</span><br><span \
style="color: hsl(0, 100%, 40%);">-# This file only includes ports in the well known \
port range, and</span><br><span style="color: hsl(0, 100%, 40%);">-# is also not \
complete - it only includes commonly used ports</span><br><span style="color: hsl(0, \
100%, 40%);">-# See RFC 1700 for a full list.</span><br><span style="color: hsl(0, \
100%, 40%);">-#</span><br><span style="color: hsl(0, 100%, \
40%);">-tcpmux		1/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-echo		7/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-echo		7/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-discard		9/tcp		sink null</span><br><span style="color: hsl(0, 100%, \
40%);">-discard		9/udp		sink null</span><br><span style="color: hsl(0, 100%, \
40%);">-daytime		13/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-daytime		13/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-ftp-data	20/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-ftp			21/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-ssh			22/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-telnet		23/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-smtp		25/tcp		mail</span><br><span style="color: hsl(0, 100%, \
40%);">-time		37/tcp		timserver</span><br><span style="color: hsl(0, 100%, \
40%);">-time		37/udp		timserver</span><br><span style="color: hsl(0, 100%, \
40%);">-name		42/udp		nameserver</span><br><span style="color: hsl(0, 100%, \
40%);">-whois		43/tcp		nicname</span><br><span style="color: hsl(0, 100%, \
40%);">-domain		53/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-domain		53/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-bootps		67/udp		dhcps</span><br><span style="color: hsl(0, 100%, \
40%);">-bootpc		68/udp		dhcpc</span><br><span style="color: hsl(0, 100%, \
40%);">-tftp		69/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-finger		79/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-http		80/tcp		www www-http</span><br><span style="color: hsl(0, 100%, \
40%);">-kerberos	88/tcp		kdc</span><br><span style="color: hsl(0, 100%, \
40%);">-kerberos	88/udp		kdc</span><br><span style="color: hsl(0, 100%, \
40%);">-pop3		110/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-nntp		119/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-ntp			123/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-ntp			123/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-netbios-ns	137/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-netbios-ns	137/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-netbios-dgm	138/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-netbios-dgm	138/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-netbios-ssn	139/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-netbios-ssn	139/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-imap		143/tcp		imap2 imap4</span><br><span style="color: hsl(0, 100%, \
40%);">-irc			194/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-ldap		389/tcp</span><br><span style="color: hsl(0, 100%, \
40%);">-ldap		389/udp</span><br><span style="color: hsl(0, 100%, \
40%);">-https		443/tcp</span><br><span>diff --git \
a/src/system/libnetwork/netresolv/irs/lcl_sv.cpp \
b/src/system/libnetwork/netresolv/irs/lcl_sv.cpp</span><br><span>deleted file mode \
100644</span><br><span>index cece2d2..0000000</span><br><span>--- \
a/src/system/libnetwork/netresolv/irs/lcl_sv.cpp</span><br><span>+++ \
/dev/null</span><br><span>@@ -1,351 +0,0 @@</span><br><span style="color: hsl(0, \
100%, 40%);">-/*</span><br><span style="color: hsl(0, 100%, 40%);">- * Copyright \
2006-2009, Haiku, Inc. All Rights Reserved.</span><br><span style="color: hsl(0, \
100%, 40%);">- * Distributed under the terms of the MIT License.</span><br><span \
style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span \
style="color: hsl(0, 100%, 40%);">- * Copyright (c) 1989, 1993, 1995</span><br><span \
style="color: hsl(0, 100%, 40%);">- *	The Regents of the University of California.  \
All rights reserved.</span><br><span style="color: hsl(0, 100%, 40%);">- \
*</span><br><span style="color: hsl(0, 100%, 40%);">- * Redistribution and use in \
source and binary forms, with or without</span><br><span style="color: hsl(0, 100%, \
40%);">- * modification, are permitted provided that the following \
conditions</span><br><span style="color: hsl(0, 100%, 40%);">- * are \
met:</span><br><span style="color: hsl(0, 100%, 40%);">- * 1. Redistributions of \
source code must retain the above copyright</span><br><span style="color: hsl(0, \
100%, 40%);">- *    notice, this list of conditions and the following \
disclaimer.</span><br><span style="color: hsl(0, 100%, 40%);">- * 2. Redistributions \
in binary form must reproduce the above copyright</span><br><span style="color: \
hsl(0, 100%, 40%);">- *    notice, this list of conditions and the following \
disclaimer in the</span><br><span style="color: hsl(0, 100%, 40%);">- *    \
documentation and/or other materials provided with the distribution.</span><br><span \
style="color: hsl(0, 100%, 40%);">- * 3. All advertising materials mentioning \
features or use of this software</span><br><span style="color: hsl(0, 100%, 40%);">- \
*    must display the following acknowledgement:</span><br><span style="color: hsl(0, \
100%, 40%);">- *	This product includes software developed by the University \
of</span><br><span style="color: hsl(0, 100%, 40%);">- *	California, Berkeley and its \
contributors.</span><br><span style="color: hsl(0, 100%, 40%);">- * 4. Neither the \
name of the University nor the names of its contributors</span><br><span \
style="color: hsl(0, 100%, 40%);">- *    may be used to endorse or promote products \
derived from this software</span><br><span style="color: hsl(0, 100%, 40%);">- *    \
without specific prior written permission.</span><br><span style="color: hsl(0, 100%, \
40%);">- *</span><br><span style="color: hsl(0, 100%, 40%);">- * THIS SOFTWARE IS \
PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS&#39;&#39; AND</span><br><span \
style="color: hsl(0, 100%, 40%);">- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, \
BUT NOT LIMITED TO, THE</span><br><span style="color: hsl(0, 100%, 40%);">- * IMPLIED \
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span><br><span \
style="color: hsl(0, 100%, 40%);">- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS \
OR CONTRIBUTORS BE LIABLE</span><br><span style="color: hsl(0, 100%, 40%);">- * FOR \
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR \
CONSEQUENTIAL</span><br><span style="color: hsl(0, 100%, 40%);">- * DAMAGES \
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS</span><br><span \
style="color: hsl(0, 100%, 40%);">- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR \
BUSINESS INTERRUPTION)</span><br><span style="color: hsl(0, 100%, 40%);">- * HOWEVER \
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT</span><br><span \
style="color: hsl(0, 100%, 40%);">- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR \
OTHERWISE) ARISING IN ANY WAY</span><br><span style="color: hsl(0, 100%, 40%);">- * \
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY \
OF</span><br><span style="color: hsl(0, 100%, 40%);">- * SUCH DAMAGE.</span><br><span \
style="color: hsl(0, 100%, 40%);">- */</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-/*</span><br><span \
style="color: hsl(0, 100%, 40%);">- * Copyright (c) 2004 by Internet Systems \
Consortium, Inc. (&quot;ISC&quot;)</span><br><span style="color: hsl(0, 100%, \
40%);">- * Portions Copyright (c) 1996-1999 by Internet Software \
Consortium.</span><br><span style="color: hsl(0, 100%, 40%);">- *</span><br><span \
style="color: hsl(0, 100%, 40%);">- * Permission to use, copy, modify, and distribute \
this software for any</span><br><span style="color: hsl(0, 100%, 40%);">- * purpose \
with or without fee is hereby granted, provided that the above</span><br><span \
style="color: hsl(0, 100%, 40%);">- * copyright notice and this permission notice \
appear in all copies.</span><br><span style="color: hsl(0, 100%, 40%);">- \
*</span><br><span style="color: hsl(0, 100%, 40%);">- * THE SOFTWARE IS PROVIDED \
&quot;AS IS&quot; AND ISC DISCLAIMS ALL WARRANTIES</span><br><span style="color: \
hsl(0, 100%, 40%);">- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES \
OF</span><br><span style="color: hsl(0, 100%, 40%);">- * MERCHANTABILITY AND FITNESS. \
IN NO EVENT SHALL ISC BE LIABLE FOR</span><br><span style="color: hsl(0, 100%, \
40%);">- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY \
DAMAGES</span><br><span style="color: hsl(0, 100%, 40%);">- * WHATSOEVER RESULTING \
FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN</span><br><span style="color: hsl(0, \
100%, 40%);">- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING \
OUT</span><br><span style="color: hsl(0, 100%, 40%);">- * OF OR IN CONNECTION WITH \
THE USE OR PERFORMANCE OF THIS SOFTWARE.</span><br><span style="color: hsl(0, 100%, \
40%);">- */</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span \
style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, \
40%);">-#include &quot;port_before.h&quot;</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-extern &quot;C&quot; \
{</span><br><span style="color: hsl(0, 100%, 40%);">-// libbind&#39;s internal \
headers aren&#39;t C++ safe</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&quot;irs_p.h&quot;</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&quot;lcl_p.h&quot;</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#define private \
private_data</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;irs.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-#undef \
private</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;isc/memcluster.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, \
40%);">-}</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;sys/types.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;sys/socket.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;netinet/in.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;arpa/nameser.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;resolv.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, \
40%);">-#include &quot;port_after.h&quot;</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;errno.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;fcntl.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;limits.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;stdio.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;string.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-#include \
&lt;stdlib.h&gt;</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;FindDirectory.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;fs_attr.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;image.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-#include &lt;TypeConstants.h&gt;</span><br><span \
style="color: hsl(0, 100%, 40%);">-</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-#define \
IRS_SV_MAXALIASES	35</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-struct service_private \
{</span><br><span style="color: hsl(0, 100%, 40%);">-	FILE*	file;</span><br><span \
style="color: hsl(0, 100%, 40%);">-	char	line[BUFSIZ + 1];</span><br><span \
style="color: hsl(0, 100%, 40%);">-	struct servent servent;</span><br><span \
style="color: hsl(0, 100%, 40%);">-	char*	aliases[IRS_SV_MAXALIASES];</span><br><span \
style="color: hsl(0, 100%, 40%);">-};</span><br><span style="color: hsl(0, 100%, \
40%);">-</span><br><span style="color: hsl(0, 100%, 40%);">-</span><br><span \
style="color: hsl(0, 100%, 40%);">-static status_t</span><br><span style="color: \
hsl(0, 100%, 40%);">-find_own_image(image_info* _info)</span><br><span style="color: \

<div style="display:none"> Gerrit-Project: haiku </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: \
If18bdd9593463b38a9aaedb7a621d0ddc15530e4 </div> <div style="display:none"> \
Gerrit-Change-Number: 6878 </div> <div style="display:none"> Gerrit-PatchSet: 1 \
</div> <div style="display:none"> Gerrit-Owner: waddlesplash \
&lt;waddlesplash@gmail.com&gt; </div> <div style="display:none"> Gerrit-MessageType: \
newchange </div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic