Updated BIND resolver library (libbind.so) to version 9.3.1.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15570 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f6486d9d01
commit
c544064d35
@ -61,13 +61,16 @@
|
||||
#ifndef _INET_H_
|
||||
#define _INET_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
/* External definitions for functions in inet(3) */
|
||||
|
||||
/* R5 libnet.so does not have "__" prefix. */
|
||||
#ifndef BUILDING_R5_LIBNET
|
||||
#include <sys/param.h>
|
||||
#if (!defined(BSD)) || (BSD < 199306)
|
||||
# include <sys/bitypes.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#define inet_addr __inet_addr
|
||||
#define inet_aton __inet_aton
|
||||
#define inet_lnaof __inet_lnaof
|
||||
@ -84,32 +87,38 @@
|
||||
#define inet_ntop __inet_ntop
|
||||
#define inet_nsap_addr __inet_nsap_addr
|
||||
#define inet_nsap_ntoa __inet_nsap_ntoa
|
||||
|
||||
__BEGIN_DECLS
|
||||
unsigned long inet_addr __P((const char *));
|
||||
int inet_aton __P((const char *, struct in_addr *));
|
||||
unsigned long inet_lnaof __P((struct in_addr));
|
||||
struct in_addr inet_makeaddr __P((u_long , u_long));
|
||||
char * inet_neta __P((u_long, char *, size_t));
|
||||
unsigned long inet_netof __P((struct in_addr));
|
||||
unsigned long inet_network __P((const char *));
|
||||
char *inet_net_ntop __P((int, const void *, int, char *, size_t));
|
||||
int inet_net_pton __P((int, const char *, void *, size_t));
|
||||
char *inet_cidr_ntop __P((int, const void *, int, char *, size_t));
|
||||
int inet_cidr_pton __P((int, const char *, void *, int *));
|
||||
/*const*/ char *inet_ntoa __P((struct in_addr));
|
||||
int inet_pton __P((int, const char *, void *));
|
||||
const char *inet_ntop __P((int, const void *, char *, size_t));
|
||||
u_int inet_nsap_addr __P((const char *, u_char *, int));
|
||||
char *inet_nsap_ntoa __P((int, const u_char *, char *));
|
||||
__END_DECLS
|
||||
|
||||
#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
|
||||
/*
|
||||
* Macros for number representation conversion.
|
||||
*
|
||||
* netinet/in.h is another location for these macros
|
||||
*/
|
||||
#ifndef ntohl
|
||||
#define ntohl(x) (x)
|
||||
#define ntohs(x) (x)
|
||||
#define htonl(x) (x)
|
||||
#define htons(x) (x)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
unsigned long inet_addr(const char *);
|
||||
int inet_aton(const char *, struct in_addr *);
|
||||
unsigned long inet_lnaof(struct in_addr);
|
||||
struct in_addr inet_makeaddr(u_long , u_long);
|
||||
char * inet_neta(u_long, char *, size_t);
|
||||
unsigned long inet_netof(struct in_addr);
|
||||
unsigned long inet_network(const char *);
|
||||
char *inet_net_ntop(int, const void *, int, char *, size_t);
|
||||
int inet_net_pton(int, const char *, void *, size_t);
|
||||
char *inet_cidr_ntop(int, const void *, int, char *, size_t);
|
||||
int inet_cidr_pton(int, const char *, void *, int *);
|
||||
/*const*/ char *inet_ntoa(struct in_addr);
|
||||
int inet_pton(int, const char *, void *);
|
||||
const char *inet_ntop(int, const void *, char *, size_t);
|
||||
u_int inet_nsap_addr(const char *, u_char *, int);
|
||||
char *inet_nsap_ntoa(int, const u_char *, char *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* !_INET_H_ */
|
||||
|
@ -1,7 +1,3 @@
|
||||
/*
|
||||
Modified for [Open]BeOS
|
||||
*/
|
||||
|
||||
/*
|
||||
* ++Copyright++ 1980, 1983, 1988, 1993
|
||||
* -
|
||||
@ -93,18 +89,9 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Modified for OpenBeOS
|
||||
*/
|
||||
|
||||
#ifndef _NETDB_H_
|
||||
#define _NETDB_H_
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
/*
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#if (!defined(BSD)) || (BSD < 199306)
|
||||
@ -114,12 +101,6 @@
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stdio.h>
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef _PATH_HEQUIV
|
||||
#define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||
@ -137,8 +118,18 @@ extern "C" {
|
||||
#define _PATH_SERVICES "/etc/services"
|
||||
#endif
|
||||
|
||||
extern int * __h_errno (void);
|
||||
#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||
#define __h_errno __h_errno_location
|
||||
#endif
|
||||
__BEGIN_DECLS
|
||||
extern int * __h_errno __P((void));
|
||||
__END_DECLS
|
||||
#if defined(_REENTRANT) || \
|
||||
(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||
#define h_errno (*__h_errno())
|
||||
#else
|
||||
extern int h_errno;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Structures returned by network data base library. All addresses are
|
||||
@ -183,9 +174,21 @@ struct addrinfo {
|
||||
int ai_family; /* PF_xxx */
|
||||
int ai_socktype; /* SOCK_xxx */
|
||||
int ai_protocol; /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
|
||||
#if defined(sun) && defined(_SOCKLEN_T)
|
||||
#ifdef __sparc9
|
||||
int _ai_pad;
|
||||
#endif
|
||||
socklen_t ai_addrlen;
|
||||
#else
|
||||
size_t ai_addrlen; /* length of ai_addr */
|
||||
#endif
|
||||
#ifdef __linux
|
||||
struct sockaddr *ai_addr; /* binary address */
|
||||
char *ai_canonname; /* canonical name for hostname */
|
||||
#else
|
||||
char *ai_canonname; /* canonical name for hostname */
|
||||
struct sockaddr *ai_addr; /* binary address */
|
||||
#endif
|
||||
struct addrinfo *ai_next; /* next structure in linked list */
|
||||
};
|
||||
|
||||
@ -259,6 +262,7 @@ struct addrinfo {
|
||||
#define SCOPE_DELIMITER '%'
|
||||
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#if defined (__hpux) || defined(__osf__) || defined(_AIX)
|
||||
#define _MAXALIASES 35
|
||||
#define _MAXLINELEN 1024
|
||||
@ -348,9 +352,8 @@ struct servent_data {
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
#define __P(a) a
|
||||
|
||||
#endif
|
||||
__BEGIN_DECLS
|
||||
void endhostent __P((void));
|
||||
void endnetent __P((void));
|
||||
void endprotoent __P((void));
|
||||
@ -387,48 +390,163 @@ const char *gai_strerror __P((int));
|
||||
struct hostent *getipnodebyname __P((const char *, int, int, int *));
|
||||
struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *));
|
||||
void freehostent __P((struct hostent *));
|
||||
#ifdef __GLIBC__
|
||||
int getnetgrent __P((/* const */ char **, /* const */ char **,
|
||||
/* const */ char **));
|
||||
void setnetgrent __P((const char *));
|
||||
void endnetgrent __P((void));
|
||||
int innetgr __P((const char *, const char *, const char *,
|
||||
const char *));
|
||||
#endif
|
||||
|
||||
#ifdef _REENTRANT
|
||||
#if defined(__hpux) || defined(__osf__) || defined(_AIX)
|
||||
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||
struct hostent_data *));
|
||||
int gethostbyname_r __P((const char *, struct hostent *,
|
||||
struct hostent_data *));
|
||||
int gethostent_r __P((struct hostent *, struct hostent_data *));
|
||||
#if defined(_AIX)
|
||||
void sethostent_r __P((int, struct hostent_data *));
|
||||
#else
|
||||
int sethostent_r __P((int, struct hostent_data *));
|
||||
#endif
|
||||
#if defined(__hpux)
|
||||
int endhostent_r __P((struct hostent_data *));
|
||||
#else
|
||||
void endhostent_r __P((struct hostent_data *));
|
||||
#endif
|
||||
|
||||
#if defined(__hpux) || defined(__osf__)
|
||||
int getnetbyaddr_r __P((int, int,
|
||||
struct netent *, struct netent_data *));
|
||||
#else
|
||||
int getnetbyaddr_r __P((long, int,
|
||||
struct netent *, struct netent_data *));
|
||||
#endif
|
||||
int getnetbyname_r __P((const char *,
|
||||
struct netent *, struct netent_data *));
|
||||
int getnetent_r __P((struct netent *, struct netent_data *));
|
||||
int setnetent_r __P((int, struct netent_data *));
|
||||
#ifdef __hpux
|
||||
int endnetent_r __P((struct netent_data *buffer));
|
||||
#else
|
||||
void endnetent_r __P((struct netent_data *buffer));
|
||||
#endif
|
||||
|
||||
int getprotobyname_r __P((const char *,
|
||||
struct protoent *, struct protoent_data *));
|
||||
int getprotobynumber_r __P((int,
|
||||
struct protoent *, struct protoent_data *));
|
||||
int getprotoent_r __P((struct protoent *, struct protoent_data *));
|
||||
int setprotoent_r __P((int, struct protoent_data *));
|
||||
#ifdef __hpux
|
||||
int endprotoent_r __P((struct protoent_data *));
|
||||
#else
|
||||
void endprotoent_r __P((struct protoent_data *));
|
||||
#endif
|
||||
|
||||
int getservbyname_r __P((const char *, const char *,
|
||||
struct servent *, struct servent_data *));
|
||||
int getservbyport_r __P((int, const char *,
|
||||
struct servent *, struct servent_data *));
|
||||
int getservent_r __P((struct servent *, struct servent_data *));
|
||||
int setservent_r __P((int, struct servent_data *));
|
||||
#ifdef __hpux
|
||||
int endservent_r __P((struct servent_data *));
|
||||
#else
|
||||
void endservent_r __P((struct servent_data *));
|
||||
#endif
|
||||
#else
|
||||
/* defined(sun) || defined(bsdi) */
|
||||
#ifdef __GLIBC__
|
||||
int gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||
char *, size_t, struct hostent **, int *));
|
||||
int gethostbyname_r __P((const char *, struct hostent *,
|
||||
char *, size_t, struct hostent **, int *));
|
||||
int gethostent_r __P((struct hostent *, char *, size_t,
|
||||
struct hostent **, int *));
|
||||
#else
|
||||
struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *,
|
||||
char *, int, int *));
|
||||
struct hostent *gethostbyname_r __P((const char *, struct hostent *,
|
||||
char *, int, int *));
|
||||
struct hostent *gethostent_r __P((struct hostent *, char *, int, int *));
|
||||
#endif
|
||||
void sethostent_r __P((int));
|
||||
void endhostent_r __P((void));
|
||||
|
||||
#ifdef __GLIBC__
|
||||
int getnetbyname_r __P((const char *, struct netent *,
|
||||
char *, size_t, struct netent **, int*));
|
||||
int getnetbyaddr_r __P((unsigned long int, int, struct netent *,
|
||||
char *, size_t, struct netent **, int*));
|
||||
int getnetent_r __P((struct netent *, char *, size_t, struct netent **, int*));
|
||||
#else
|
||||
struct netent *getnetbyname_r __P((const char *, struct netent *,
|
||||
char *, int));
|
||||
struct netent *getnetbyaddr_r __P((long, int, struct netent *,
|
||||
char *, int));
|
||||
struct netent *getnetent_r __P((struct netent *, char *, int));
|
||||
#endif
|
||||
void setnetent_r __P((int));
|
||||
void endnetent_r __P((void));
|
||||
|
||||
#ifdef __GLIBC__
|
||||
int getprotobyname_r __P((const char *, struct protoent *, char *,
|
||||
size_t, struct protoent **));
|
||||
int getprotobynumber_r __P((int, struct protoent *, char *, size_t,
|
||||
struct protoent **));
|
||||
int getprotoent_r __P((struct protoent *, char *, size_t, struct protoent **));
|
||||
#else
|
||||
struct protoent *getprotobyname_r __P((const char *,
|
||||
struct protoent *, char *, int));
|
||||
struct protoent *getprotobynumber_r __P((int,
|
||||
struct protoent *, char *, int));
|
||||
struct protoent *getprotoent_r __P((struct protoent *, char *, int));
|
||||
#endif
|
||||
void setprotoent_r __P((int));
|
||||
void endprotoent_r __P((void));
|
||||
|
||||
#ifdef __GLIBC__
|
||||
int getservbyname_r __P((const char *name, const char *,
|
||||
struct servent *, char *, size_t, struct servent **));
|
||||
int getservbyport_r __P((int port, const char *,
|
||||
struct servent *, char *, size_t, struct servent **));
|
||||
int getservent_r __P((struct servent *, char *, size_t, struct servent **));
|
||||
#else
|
||||
struct servent *getservbyname_r __P((const char *name, const char *,
|
||||
struct servent *, char *, int));
|
||||
struct servent *getservbyport_r __P((int port, const char *,
|
||||
struct servent *, char *, int));
|
||||
struct servent *getservent_r __P((struct servent *, char *, int));
|
||||
#endif
|
||||
void setservent_r __P((int));
|
||||
void endservent_r __P((void));
|
||||
|
||||
|
||||
/* BeOS specific, because of lack of UNIX passwd functions */
|
||||
int getusername(char *username, unsigned userlen);
|
||||
int getpassword(char *password, unsigned passlen);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#ifdef __GLIBC__
|
||||
int getnetgrent_r __P((char **, char **, char **, char *, size_t));
|
||||
#endif
|
||||
#ifdef _AIX
|
||||
int setnetgrent_r __P((char *, void **));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
__END_DECLS
|
||||
|
||||
/* This is nec'y to make this include file properly replace the sun version. */
|
||||
#ifdef sun
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#include <rpc/netdb.h>
|
||||
#else
|
||||
struct rpcent {
|
||||
char *r_name; /* name of server for this rpc program */
|
||||
char **r_aliases; /* alias list */
|
||||
int r_number; /* rpc program number */
|
||||
};
|
||||
struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent();
|
||||
#endif /* __GNU_LIBRARY__ */
|
||||
#endif /* sun */
|
||||
|
||||
#endif /* !_NETDB_H_ */
|
||||
|
501
headers/legacy/network/resolv.h
Normal file
501
headers/legacy/network/resolv.h
Normal file
@ -0,0 +1,501 @@
|
||||
/*
|
||||
* Copyright (c) 1983, 1987, 1989
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)resolv.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _RESOLV_H_
|
||||
#define _RESOLV_H_
|
||||
|
||||
#include <sys/param.h>
|
||||
#if (!defined(BSD)) || (BSD < 199306)
|
||||
# include <sys/bitypes.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/socket.h>
|
||||
#include <stdio.h>
|
||||
#include <arpa/nameser.h>
|
||||
|
||||
/*
|
||||
* Revision information. This is the release date in YYYYMMDD format.
|
||||
* It can change every day so the right thing to do with it is use it
|
||||
* in preprocessor commands such as "#if (__RES > 19931104)". Do not
|
||||
* compare for equality; rather, use it to determine whether your resolver
|
||||
* is new enough to contain a certain feature.
|
||||
*/
|
||||
|
||||
#define __RES 20030124
|
||||
|
||||
/*
|
||||
* This used to be defined in res_query.c, now it's in herror.c.
|
||||
* [XXX no it's not. It's in irs/irs_data.c]
|
||||
* It was
|
||||
* never extern'd by any *.h file before it was placed here. For thread
|
||||
* aware programs, the last h_errno value set is stored in res->h_errno.
|
||||
*
|
||||
* XXX: There doesn't seem to be a good reason for exposing RES_SET_H_ERRNO
|
||||
* (and __h_errno_set) to the public via <resolv.h>.
|
||||
* XXX: __h_errno_set is really part of IRS, not part of the resolver.
|
||||
* If somebody wants to build and use a resolver that doesn't use IRS,
|
||||
* what do they do? Perhaps something like
|
||||
* #ifdef WANT_IRS
|
||||
* # define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
|
||||
* #else
|
||||
* # define RES_SET_H_ERRNO(r,x) (h_errno = (r)->res_h_errno = (x))
|
||||
* #endif
|
||||
*/
|
||||
|
||||
#define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x)
|
||||
struct __res_state; /* forward */
|
||||
__BEGIN_DECLS
|
||||
void __h_errno_set(struct __res_state *res, int err);
|
||||
__END_DECLS
|
||||
|
||||
/*
|
||||
* Resolver configuration file.
|
||||
* Normally not present, but may contain the address of the
|
||||
* initial name server(s) to query and the domain search list.
|
||||
*/
|
||||
|
||||
#ifndef _PATH_RESCONF
|
||||
#define _PATH_RESCONF "/etc/resolv.conf"
|
||||
#endif
|
||||
|
||||
typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
|
||||
res_sendhookact;
|
||||
|
||||
#ifndef __PMT
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define __PMT(args) args
|
||||
#else
|
||||
#define __PMT(args) ()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef res_sendhookact (*res_send_qhook)__PMT((struct sockaddr * const *,
|
||||
const u_char **, int *,
|
||||
u_char *, int, int *));
|
||||
|
||||
typedef res_sendhookact (*res_send_rhook)__PMT((const struct sockaddr *,
|
||||
const u_char *, int, u_char *,
|
||||
int, int *));
|
||||
|
||||
struct res_sym {
|
||||
int number; /* Identifying number, like T_MX */
|
||||
const char * name; /* Its symbolic name, like "MX" */
|
||||
const char * humanname; /* Its fun name, like "mail exchanger" */
|
||||
};
|
||||
|
||||
/*
|
||||
* Global defines and variables for resolver stub.
|
||||
*/
|
||||
#define MAXNS 3 /* max # name servers we'll track */
|
||||
#define MAXDFLSRCH 3 /* # default domain levels to try */
|
||||
#define MAXDNSRCH 6 /* max # domains in search path */
|
||||
#define LOCALDOMAINPARTS 2 /* min levels in name that is "local" */
|
||||
|
||||
#define RES_TIMEOUT 5 /* min. seconds between retries */
|
||||
#define MAXRESOLVSORT 10 /* number of net to sort on */
|
||||
#define RES_MAXNDOTS 15 /* should reflect bit field size */
|
||||
#define RES_MAXRETRANS 30 /* only for resolv.conf/RES_OPTIONS */
|
||||
#define RES_MAXRETRY 5 /* only for resolv.conf/RES_OPTIONS */
|
||||
#define RES_DFLRETRY 2 /* Default #/tries. */
|
||||
#define RES_MAXTIME 65535 /* Infinity, in milliseconds. */
|
||||
|
||||
struct __res_state_ext;
|
||||
|
||||
struct __res_state {
|
||||
int retrans; /* retransmission time interval */
|
||||
int retry; /* number of times to retransmit */
|
||||
#ifdef sun
|
||||
u_int options; /* option flags - see below. */
|
||||
#else
|
||||
u_long options; /* option flags - see below. */
|
||||
#endif
|
||||
int nscount; /* number of name servers */
|
||||
struct sockaddr_in
|
||||
nsaddr_list[MAXNS]; /* address of name server */
|
||||
#define nsaddr nsaddr_list[0] /* for backward compatibility */
|
||||
u_short id; /* current message id */
|
||||
char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */
|
||||
char defdname[256]; /* default domain (deprecated) */
|
||||
#ifdef sun
|
||||
u_int pfcode; /* RES_PRF_ flags - see below. */
|
||||
#else
|
||||
u_long pfcode; /* RES_PRF_ flags - see below. */
|
||||
#endif
|
||||
unsigned ndots:4; /* threshold for initial abs. query */
|
||||
unsigned nsort:4; /* number of elements in sort_list[] */
|
||||
char unused[3];
|
||||
struct {
|
||||
struct in_addr addr;
|
||||
u_int32_t mask;
|
||||
} sort_list[MAXRESOLVSORT];
|
||||
res_send_qhook qhook; /* query hook */
|
||||
res_send_rhook rhook; /* response hook */
|
||||
int res_h_errno; /* last one set for this context */
|
||||
int _vcsock; /* PRIVATE: for res_send VC i/o */
|
||||
u_int _flags; /* PRIVATE: see below */
|
||||
u_int _pad; /* make _u 64 bit aligned */
|
||||
union {
|
||||
/* On an 32-bit arch this means 512b total. */
|
||||
char pad[72 - 4*sizeof (int) - 2*sizeof (void *)];
|
||||
struct {
|
||||
u_int16_t nscount;
|
||||
u_int16_t nstimes[MAXNS]; /* ms. */
|
||||
int nssocks[MAXNS];
|
||||
struct __res_state_ext *ext; /* extention for IPv6 */
|
||||
} _ext;
|
||||
} _u;
|
||||
};
|
||||
|
||||
typedef struct __res_state *res_state;
|
||||
|
||||
union res_sockaddr_union {
|
||||
struct sockaddr_in sin;
|
||||
#ifdef IN6ADDR_ANY_INIT
|
||||
struct sockaddr_in6 sin6;
|
||||
#endif
|
||||
#ifdef ISC_ALIGN64
|
||||
int64_t __align64; /* 64bit alignment */
|
||||
#else
|
||||
int32_t __align32; /* 32bit alignment */
|
||||
#endif
|
||||
char __space[128]; /* max size */
|
||||
};
|
||||
|
||||
/*
|
||||
* Resolver flags (used to be discrete per-module statics ints).
|
||||
*/
|
||||
#define RES_F_VC 0x00000001 /* socket is TCP */
|
||||
#define RES_F_CONN 0x00000002 /* socket is connected */
|
||||
#define RES_F_EDNS0ERR 0x00000004 /* EDNS0 caused errors */
|
||||
#define RES_F__UNUSED 0x00000008 /* (unused) */
|
||||
#define RES_F_LASTMASK 0x000000F0 /* ordinal server of last res_nsend */
|
||||
#define RES_F_LASTSHIFT 4 /* bit position of LASTMASK "flag" */
|
||||
#define RES_GETLAST(res) (((res)._flags & RES_F_LASTMASK) >> RES_F_LASTSHIFT)
|
||||
|
||||
/* res_findzonecut2() options */
|
||||
#define RES_EXHAUSTIVE 0x00000001 /* always do all queries */
|
||||
#define RES_IPV4ONLY 0x00000002 /* IPv4 only */
|
||||
#define RES_IPV6ONLY 0x00000004 /* IPv6 only */
|
||||
|
||||
/*
|
||||
* Resolver options (keep these in synch with res_debug.c, please)
|
||||
*/
|
||||
#define RES_INIT 0x00000001 /* address initialized */
|
||||
#define RES_DEBUG 0x00000002 /* print debug messages */
|
||||
#define RES_AAONLY 0x00000004 /* authoritative answers only (!IMPL)*/
|
||||
#define RES_USEVC 0x00000008 /* use virtual circuit */
|
||||
#define RES_PRIMARY 0x00000010 /* query primary server only (!IMPL) */
|
||||
#define RES_IGNTC 0x00000020 /* ignore trucation errors */
|
||||
#define RES_RECURSE 0x00000040 /* recursion desired */
|
||||
#define RES_DEFNAMES 0x00000080 /* use default domain name */
|
||||
#define RES_STAYOPEN 0x00000100 /* Keep TCP socket open */
|
||||
#define RES_DNSRCH 0x00000200 /* search up local domain tree */
|
||||
#define RES_INSECURE1 0x00000400 /* type 1 security disabled */
|
||||
#define RES_INSECURE2 0x00000800 /* type 2 security disabled */
|
||||
#define RES_NOALIASES 0x00001000 /* shuts off HOSTALIASES feature */
|
||||
#define RES_USE_INET6 0x00002000 /* use/map IPv6 in gethostbyname() */
|
||||
#define RES_ROTATE 0x00004000 /* rotate ns list after each query */
|
||||
#define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
|
||||
#define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
|
||||
#define RES_BLAST 0x00020000 /* blast all recursive servers */
|
||||
#define RES_NOTLDQUERY 0x00100000 /* don't unqualified name as a tld */
|
||||
#define RES_USE_DNSSEC 0x00200000 /* use DNSSEC using OK bit in OPT */
|
||||
/* #define RES_DEBUG2 0x00400000 */ /* nslookup internal */
|
||||
/* KAME extensions: use higher bit to avoid conflict with ISC use */
|
||||
#define RES_USE_DNAME 0x10000000 /* use DNAME */
|
||||
#define RES_USE_EDNS0 0x40000000 /* use EDNS0 if configured */
|
||||
#define RES_NO_NIBBLE2 0x80000000 /* disable alternate nibble lookup */
|
||||
|
||||
#define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | \
|
||||
RES_DNSRCH | RES_NO_NIBBLE2)
|
||||
|
||||
/*
|
||||
* Resolver "pfcode" values. Used by dig.
|
||||
*/
|
||||
#define RES_PRF_STATS 0x00000001
|
||||
#define RES_PRF_UPDATE 0x00000002
|
||||
#define RES_PRF_CLASS 0x00000004
|
||||
#define RES_PRF_CMD 0x00000008
|
||||
#define RES_PRF_QUES 0x00000010
|
||||
#define RES_PRF_ANS 0x00000020
|
||||
#define RES_PRF_AUTH 0x00000040
|
||||
#define RES_PRF_ADD 0x00000080
|
||||
#define RES_PRF_HEAD1 0x00000100
|
||||
#define RES_PRF_HEAD2 0x00000200
|
||||
#define RES_PRF_TTLID 0x00000400
|
||||
#define RES_PRF_HEADX 0x00000800
|
||||
#define RES_PRF_QUERY 0x00001000
|
||||
#define RES_PRF_REPLY 0x00002000
|
||||
#define RES_PRF_INIT 0x00004000
|
||||
#define RES_PRF_TRUNC 0x00008000
|
||||
/* 0x00010000 */
|
||||
|
||||
/* Things involving an internal (static) resolver context. */
|
||||
#ifdef _REENTRANT
|
||||
__BEGIN_DECLS
|
||||
extern struct __res_state *__res_state(void);
|
||||
__END_DECLS
|
||||
#define _res (*__res_state())
|
||||
#else
|
||||
#ifndef __BIND_NOSTATIC
|
||||
extern struct __res_state _res;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __BIND_NOSTATIC
|
||||
#define fp_nquery __fp_nquery
|
||||
#define fp_query __fp_query
|
||||
#define hostalias __hostalias
|
||||
#define p_query __p_query
|
||||
#define res_close __res_close
|
||||
#define res_init __res_init
|
||||
#define res_isourserver __res_isourserver
|
||||
#define res_mkquery __res_mkquery
|
||||
#define res_query __res_query
|
||||
#define res_querydomain __res_querydomain
|
||||
#define res_search __res_search
|
||||
#define res_send __res_send
|
||||
#define res_sendsigned __res_sendsigned
|
||||
|
||||
__BEGIN_DECLS
|
||||
void fp_nquery __P((const u_char *, int, FILE *));
|
||||
void fp_query __P((const u_char *, FILE *));
|
||||
const char * hostalias __P((const char *));
|
||||
void p_query __P((const u_char *));
|
||||
void res_close __P((void));
|
||||
int res_init __P((void));
|
||||
int res_isourserver __P((const struct sockaddr_in *));
|
||||
int res_mkquery __P((int, const char *, int, int, const u_char *,
|
||||
int, const u_char *, u_char *, int));
|
||||
int res_query __P((const char *, int, int, u_char *, int));
|
||||
int res_querydomain __P((const char *, const char *, int, int,
|
||||
u_char *, int));
|
||||
int res_search __P((const char *, int, int, u_char *, int));
|
||||
int res_send __P((const u_char *, int, u_char *, int));
|
||||
int res_sendsigned __P((const u_char *, int, ns_tsig_key *,
|
||||
u_char *, int));
|
||||
__END_DECLS
|
||||
#endif
|
||||
|
||||
#if !defined(SHARED_LIBBIND) || defined(LIB)
|
||||
/*
|
||||
* If libbind is a shared object (well, DLL anyway)
|
||||
* these externs break the linker when resolv.h is
|
||||
* included by a lib client (like named)
|
||||
* Make them go away if a client is including this
|
||||
*
|
||||
*/
|
||||
extern const struct res_sym __p_key_syms[];
|
||||
extern const struct res_sym __p_cert_syms[];
|
||||
extern const struct res_sym __p_class_syms[];
|
||||
extern const struct res_sym __p_type_syms[];
|
||||
extern const struct res_sym __p_rcode_syms[];
|
||||
#endif /* SHARED_LIBBIND */
|
||||
|
||||
#define b64_ntop __b64_ntop
|
||||
#define b64_pton __b64_pton
|
||||
#define dn_comp __dn_comp
|
||||
#define dn_count_labels __dn_count_labels
|
||||
#define dn_expand __dn_expand
|
||||
#define dn_skipname __dn_skipname
|
||||
#define fp_resstat __fp_resstat
|
||||
#define loc_aton __loc_aton
|
||||
#define loc_ntoa __loc_ntoa
|
||||
#define p_cdname __p_cdname
|
||||
#define p_cdnname __p_cdnname
|
||||
#define p_class __p_class
|
||||
#define p_fqname __p_fqname
|
||||
#define p_fqnname __p_fqnname
|
||||
#define p_option __p_option
|
||||
#define p_secstodate __p_secstodate
|
||||
#define p_section __p_section
|
||||
#define p_time __p_time
|
||||
#define p_type __p_type
|
||||
#define p_rcode __p_rcode
|
||||
#define p_sockun __p_sockun
|
||||
#define putlong __putlong
|
||||
#define putshort __putshort
|
||||
#define res_dnok __res_dnok
|
||||
#define res_findzonecut __res_findzonecut
|
||||
#define res_findzonecut2 __res_findzonecut2
|
||||
#define res_hnok __res_hnok
|
||||
#define res_hostalias __res_hostalias
|
||||
#define res_mailok __res_mailok
|
||||
#define res_nameinquery __res_nameinquery
|
||||
#define res_nclose __res_nclose
|
||||
#define res_ninit __res_ninit
|
||||
#define res_nmkquery __res_nmkquery
|
||||
#define res_pquery __res_pquery
|
||||
#define res_nquery __res_nquery
|
||||
#define res_nquerydomain __res_nquerydomain
|
||||
#define res_nsearch __res_nsearch
|
||||
#define res_nsend __res_nsend
|
||||
#define res_nsendsigned __res_nsendsigned
|
||||
#define res_nisourserver __res_nisourserver
|
||||
#define res_ownok __res_ownok
|
||||
#define res_queriesmatch __res_queriesmatch
|
||||
#define res_randomid __res_randomid
|
||||
#define sym_ntop __sym_ntop
|
||||
#define sym_ntos __sym_ntos
|
||||
#define sym_ston __sym_ston
|
||||
#define res_nopt __res_nopt
|
||||
#define res_ndestroy __res_ndestroy
|
||||
#define res_nametoclass __res_nametoclass
|
||||
#define res_nametotype __res_nametotype
|
||||
#define res_setservers __res_setservers
|
||||
#define res_getservers __res_getservers
|
||||
#define res_buildprotolist __res_buildprotolist
|
||||
#define res_destroyprotolist __res_destroyprotolist
|
||||
#define res_destroyservicelist __res_destroyservicelist
|
||||
#define res_get_nibblesuffix __res_get_nibblesuffix
|
||||
#define res_get_nibblesuffix2 __res_get_nibblesuffix2
|
||||
#define res_ourserver_p __res_ourserver_p
|
||||
#define res_protocolname __res_protocolname
|
||||
#define res_protocolnumber __res_protocolnumber
|
||||
#define res_send_setqhook __res_send_setqhook
|
||||
#define res_send_setrhook __res_send_setrhook
|
||||
#define res_servicename __res_servicename
|
||||
#define res_servicenumber __res_servicenumber
|
||||
__BEGIN_DECLS
|
||||
int res_hnok __P((const char *));
|
||||
int res_ownok __P((const char *));
|
||||
int res_mailok __P((const char *));
|
||||
int res_dnok __P((const char *));
|
||||
int sym_ston __P((const struct res_sym *, const char *, int *));
|
||||
const char * sym_ntos __P((const struct res_sym *, int, int *));
|
||||
const char * sym_ntop __P((const struct res_sym *, int, int *));
|
||||
int b64_ntop __P((u_char const *, size_t, char *, size_t));
|
||||
int b64_pton __P((char const *, u_char *, size_t));
|
||||
int loc_aton __P((const char *, u_char *));
|
||||
const char * loc_ntoa __P((const u_char *, char *));
|
||||
int dn_skipname __P((const u_char *, const u_char *));
|
||||
void putlong __P((u_int32_t, u_char *));
|
||||
void putshort __P((u_int16_t, u_char *));
|
||||
#ifndef __ultrix__
|
||||
u_int16_t _getshort __P((const u_char *));
|
||||
u_int32_t _getlong __P((const u_char *));
|
||||
#endif
|
||||
const char * p_class __P((int));
|
||||
const char * p_time __P((u_int32_t));
|
||||
const char * p_type __P((int));
|
||||
const char * p_rcode __P((int));
|
||||
const char * p_sockun __P((union res_sockaddr_union, char *, size_t));
|
||||
const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *));
|
||||
const u_char * p_cdname __P((const u_char *, const u_char *, FILE *));
|
||||
const u_char * p_fqnname __P((const u_char *, const u_char *,
|
||||
int, char *, int));
|
||||
const u_char * p_fqname __P((const u_char *, const u_char *, FILE *));
|
||||
const char * p_option __P((u_long));
|
||||
char * p_secstodate __P((u_long));
|
||||
int dn_count_labels __P((const char *));
|
||||
int dn_comp __P((const char *, u_char *, int,
|
||||
u_char **, u_char **));
|
||||
int dn_expand __P((const u_char *, const u_char *, const u_char *,
|
||||
char *, int));
|
||||
u_int res_randomid __P((void));
|
||||
int res_nameinquery __P((const char *, int, int, const u_char *,
|
||||
const u_char *));
|
||||
int res_queriesmatch __P((const u_char *, const u_char *,
|
||||
const u_char *, const u_char *));
|
||||
const char * p_section __P((int, int));
|
||||
/* Things involving a resolver context. */
|
||||
int res_ninit __P((res_state));
|
||||
int res_nisourserver __P((const res_state,
|
||||
const struct sockaddr_in *));
|
||||
void fp_resstat __P((const res_state, FILE *));
|
||||
void res_pquery __P((const res_state, const u_char *, int, FILE *));
|
||||
const char * res_hostalias __P((const res_state, const char *,
|
||||
char *, size_t));
|
||||
int res_nquery __P((res_state, const char *, int, int,
|
||||
u_char *, int));
|
||||
int res_nsearch __P((res_state, const char *, int, int, u_char *,
|
||||
int));
|
||||
int res_nquerydomain __P((res_state, const char *, const char *,
|
||||
int, int, u_char *, int));
|
||||
int res_nmkquery __P((res_state, int, const char *, int, int,
|
||||
const u_char *, int, const u_char *,
|
||||
u_char *, int));
|
||||
int res_nsend __P((res_state, const u_char *, int, u_char *, int));
|
||||
int res_nsendsigned __P((res_state, const u_char *, int,
|
||||
ns_tsig_key *, u_char *, int));
|
||||
int res_findzonecut __P((res_state, const char *, ns_class, int,
|
||||
char *, size_t, struct in_addr *, int));
|
||||
int res_findzonecut2 __P((res_state, const char *, ns_class, int,
|
||||
char *, size_t,
|
||||
union res_sockaddr_union *, int));
|
||||
void res_nclose __P((res_state));
|
||||
int res_nopt __P((res_state, int, u_char *, int, int));
|
||||
void res_send_setqhook __P((res_send_qhook));
|
||||
void res_send_setrhook __P((res_send_rhook));
|
||||
int __res_vinit __P((res_state, int));
|
||||
void res_destroyservicelist __P((void));
|
||||
const char * res_servicename __P((u_int16_t, const char *));
|
||||
const char * res_protocolname __P((int));
|
||||
void res_destroyprotolist __P((void));
|
||||
void res_buildprotolist __P((void));
|
||||
const char * res_get_nibblesuffix __P((res_state));
|
||||
const char * res_get_nibblesuffix2 __P((res_state));
|
||||
void res_ndestroy __P((res_state));
|
||||
u_int16_t res_nametoclass __P((const char *, int *));
|
||||
u_int16_t res_nametotype __P((const char *, int *));
|
||||
void res_setservers __P((res_state,
|
||||
const union res_sockaddr_union *, int));
|
||||
int res_getservers __P((res_state,
|
||||
union res_sockaddr_union *, int));
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_RESOLV_H_ */
|
62
headers/legacy/network/sys/select.h
Normal file
62
headers/legacy/network/sys/select.h
Normal file
@ -0,0 +1,62 @@
|
||||
#ifndef _SYS_SELECT_H
|
||||
#define _SYS_SELECT_H
|
||||
/*
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/time.h>
|
||||
#include <signal.h>
|
||||
|
||||
|
||||
/* If FD_SET is already defined, only the select() prototype is
|
||||
* exported in this header.
|
||||
*/
|
||||
#ifndef FD_SET
|
||||
|
||||
/* You can define your own FDSETSIZE if you need more bits - but
|
||||
* it should be enough for most uses.
|
||||
*/
|
||||
#ifndef FD_SETSIZE
|
||||
# define FD_SETSIZE 1024
|
||||
#endif
|
||||
|
||||
typedef unsigned long fd_mask;
|
||||
|
||||
#ifndef _howmany
|
||||
# define _howmany(x, y) (((x) + ((y) - 1)) / (y))
|
||||
#endif
|
||||
|
||||
#define NFDBITS (sizeof(fd_mask) * 8) /* bits per mask */
|
||||
|
||||
typedef struct fd_set {
|
||||
fd_mask bits[_howmany(FD_SETSIZE, NFDBITS)];
|
||||
} fd_set;
|
||||
|
||||
#define _FD_BITSINDEX(fd) ((fd) / NFDBITS)
|
||||
#define _FD_BIT(fd) (1L << ((fd) % NFDBITS))
|
||||
|
||||
#define FD_ZERO(set) memset((set), 0, sizeof(fd_set))
|
||||
#define FD_SET(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] |= _FD_BIT(fd))
|
||||
#define FD_CLR(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] &= ~_FD_BIT(fd))
|
||||
#define FD_ISSET(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] & _FD_BIT(fd))
|
||||
|
||||
#endif /* FD_SET */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
extern int pselect(int numBits, struct fd_set *readBits, struct fd_set *writeBits,
|
||||
struct fd_set *errorBits, const struct timespec *timeout, const sigset_t *sigMask);
|
||||
#endif
|
||||
|
||||
extern int select(int numBits, struct fd_set *readBits, struct fd_set *writeBits,
|
||||
struct fd_set *errorBits, struct timeval *timeout);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_SELECT_H */
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -44,7 +44,7 @@
|
||||
#if (BSD >= 199103)
|
||||
# include <machine/endian.h>
|
||||
#else
|
||||
#if defined(linux) || defined(__BEOS__)
|
||||
#if defined(__linux) || defined(__HAIKU__) || defined(__BEOS__)
|
||||
# include <endian.h>
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
|
||||
@ -65,12 +65,12 @@
|
||||
defined(__hppa) || defined(__hp9000) || \
|
||||
defined(__hp9000s300) || defined(__hp9000s700) || \
|
||||
defined(__hp3000s900) || defined(__hpux) || defined(MPE) || \
|
||||
defined (BIT_ZERO_ON_LEFT) || defined(m68k) || \
|
||||
defined (BIT_ZERO_ON_LEFT) || defined(m68k) || defined(__sparc) || \
|
||||
(defined(__Lynx__) && \
|
||||
(defined(__68k__) || defined(__sparc__) || defined(__powerpc__)))
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
#endif /* linux */
|
||||
#endif /* __linux */
|
||||
#endif /* BSD */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1997-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -2,20 +2,20 @@
|
||||
#define ISC_CTL_H
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998,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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* eventlib.h - exported interfaces for eventlib
|
||||
@ -85,6 +85,8 @@ typedef struct { unsigned char mask[256/8]; } evByteMask;
|
||||
#define evDrop __evDrop
|
||||
#define evMainLoop __evMainLoop
|
||||
#define evHighestFD __evHighestFD
|
||||
#define evGetOption __evGetOption
|
||||
#define evSetOption __evSetOption
|
||||
|
||||
int evCreate __P((evContext *));
|
||||
void evSetDebug __P((evContext, int, FILE *));
|
||||
@ -94,6 +96,8 @@ int evDispatch __P((evContext, evEvent));
|
||||
void evDrop __P((evContext, evEvent));
|
||||
int evMainLoop __P((evContext));
|
||||
int evHighestFD __P((evContext));
|
||||
int evGetOption __P((evContext *, const char *, int *));
|
||||
int evSetOption __P((evContext *, const char *, int));
|
||||
|
||||
/* ev_connects.c */
|
||||
#define evListen __evListen
|
||||
@ -144,9 +148,11 @@ int evCancelRW __P((evContext, evStreamID));
|
||||
#define evTimeVal __evTimeVal
|
||||
|
||||
#define evNowTime __evNowTime
|
||||
#define evUTCTime __evUTCTime
|
||||
#define evLastEventTime __evLastEventTime
|
||||
#define evSetTimer __evSetTimer
|
||||
#define evClearTimer __evClearTimer
|
||||
#define evConfigTimer __evConfigTimer
|
||||
#define evResetTimer __evResetTimer
|
||||
#define evSetIdleTimer __evSetIdleTimer
|
||||
#define evClearIdleTimer __evClearIdleTimer
|
||||
@ -157,6 +163,7 @@ struct timespec evConsTime __P((time_t sec, long nsec));
|
||||
struct timespec evAddTime __P((struct timespec, struct timespec));
|
||||
struct timespec evSubTime __P((struct timespec, struct timespec));
|
||||
struct timespec evNowTime __P((void));
|
||||
struct timespec evUTCTime __P((void));
|
||||
struct timespec evLastEventTime __P((evContext));
|
||||
struct timespec evTimeSpec __P((struct timeval));
|
||||
struct timeval evTimeVal __P((struct timespec));
|
||||
@ -164,6 +171,8 @@ int evCmpTime __P((struct timespec, struct timespec));
|
||||
int evSetTimer __P((evContext, evTimerFunc, void *, struct timespec,
|
||||
struct timespec, evTimerID *));
|
||||
int evClearTimer __P((evContext, evTimerID));
|
||||
int evConfigTimer __P((evContext, evTimerID, const char *param,
|
||||
int value));
|
||||
int evResetTimer __P((evContext, evTimerID, evTimerFunc, void *,
|
||||
struct timespec, struct timespec));
|
||||
int evSetIdleTimer __P((evContext, evTimerFunc, void *, struct timespec,
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1997,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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
typedef int (*heap_higher_priority_func)(void *, void *);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1997,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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef LIST_H
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef LOGGING_H
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1997,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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef MEMCLUSTER_H
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,17 +1,24 @@
|
||||
#ifndef netgroup_h
|
||||
#define netgroup_h
|
||||
#ifndef __GLIBC__
|
||||
|
||||
int getnetgrent(const char **machinep, const char **userp,
|
||||
const char **domainp);
|
||||
/*
|
||||
* The standard is crazy. These values "belong" to getnetgrent() and
|
||||
* shouldn't be altered by the caller.
|
||||
*/
|
||||
int getnetgrent __P((/* const */ char **, /* const */ char **,
|
||||
/* const */ char **));
|
||||
|
||||
int getnetgrent_r(char **machinep, char **userp, char **domainp,
|
||||
char *buffer, int buflen);
|
||||
int getnetgrent_r __P((char **, char **, char **, char *, int));
|
||||
|
||||
void setnetgrent(const char *netgroup);
|
||||
|
||||
void endnetgrent(void);
|
||||
|
||||
int innetgr(const char *netgroup, const char *machine,
|
||||
const char *user, const char *domain);
|
||||
void endnetgrent __P((void));
|
||||
|
||||
#ifdef __osf__
|
||||
int innetgr __P((char *, char *, char *, char *));
|
||||
void setnetgrent __P((char *));
|
||||
#else
|
||||
void setnetgrent __P((const char *));
|
||||
int innetgr __P((const char *, const char *, const char *, const char *));
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1999 by Internet Software Consortium, Inc.
|
||||
*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,7 +1,8 @@
|
||||
BIND 9.2.3 ported to Haiku
|
||||
BIND 9.3.1
|
||||
ported to Haiku
|
||||
|
||||
This file contains important information for developers who want to port BIND to Haiku.
|
||||
I created config.h, port_before.h, and port_after.h with the BIND configure script and fixed some mistakes that the script made.
|
||||
This file contains important information for developers who want to update this BIND port.
|
||||
I created config.h, port_before.h, and port_after.h with "configure --enable-threads --disable-ipv6" on a BONE-compatible system and fixed some mistakes that the script made. All changes to these three files are marked with a comment containing the keyword CHANGED.
|
||||
|
||||
Our private folder are:
|
||||
headers (some headers are not defined in Haiku)
|
||||
@ -10,15 +11,12 @@ Our private folder are:
|
||||
Porting issues:
|
||||
BIND wants to include sys/un.h and utmp.h. We do not have these, so I put empty headers into the private headers folder.
|
||||
|
||||
strsep() is not defined although we #define NEED_STRSEP in port_after.h. I put it in our private src folder.
|
||||
|
||||
Haiku defines pselect(), we turn on NEEDS_PSELECT in port_after.h only if we compile for BeOS.
|
||||
Added a hacky workaround when building for non-Haiku targets: select.h (in legacy headers) only declares pselect() for Haiku.
|
||||
|
||||
Added sources for compatibility:
|
||||
src/res_resultcodes.c: BONE's host command wants _res_resultcodes to be defined
|
||||
|
||||
Changes made to the sources and headers:
|
||||
netdb.h and resolv.h: simplified by removing unneeded checks for other platforms
|
||||
nameser_compat.h: added check for __HAIKU__ and __BEOS__ to not redefine endianness
|
||||
|
||||
irs/gai_strerror and irs/irs_data.c: Changed the initialization of the mutex lock and rewrote TLS to use BeOS functions
|
||||
because we do not have full pthread support.
|
||||
irs/gai_strerror and irs/irs_data.c: Changed the initialization of the mutex lock and rewrote two functions to use BeOS-native TLS.
|
||||
|
@ -7,7 +7,7 @@ UsePrivateHeaders net ;
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers legacy network ] : true ;
|
||||
SubDirSysHdrs $(SUBDIR) ;
|
||||
|
||||
if ( $(TARGET_PLATFORM) != haiku ) {
|
||||
if $(TARGET_PLATFORM) != haiku {
|
||||
UseHeaders [ FDirName $(HAIKU_TOP) headers posix ] : true ;
|
||||
# We need the public network headers also when not compiling for Haiku.
|
||||
# Unfortunately we get more than we want, namely all POSIX headers.
|
||||
@ -193,6 +193,7 @@ SharedLibrary libbind.so :
|
||||
# private functions
|
||||
arc4random.c
|
||||
ethers.c
|
||||
gettimeofday.c
|
||||
linkaddr.c
|
||||
pthread_emu.c
|
||||
res_resultcodes.c
|
||||
|
@ -10,29 +10,29 @@
|
||||
/* #undef POSIX_GETGRGID_R */
|
||||
/* #undef POSIX_GETGRNAM_R */
|
||||
|
||||
/* #undef NEED_SETGROUPENT */
|
||||
/* #undef NEED_GETGROUPLIST */
|
||||
#define NEED_SETGROUPENT 1
|
||||
#define NEED_GETGROUPLIST 1
|
||||
|
||||
/* define if prototype for getgrnam_r() is required */
|
||||
/* #undef NEED_GETGRNAM_R */
|
||||
/* #undef NEED_GETGRGID_R */
|
||||
/* #undef NEED_GETGRENT_R */
|
||||
/* #undef NEED_SETGRENT_R */
|
||||
/* #undef NEED_ENDGRENT_R */
|
||||
#define NEED_GETGRNAM_R 1
|
||||
#define NEED_GETGRGID_R 1
|
||||
#define NEED_GETGRENT_R 1
|
||||
#define NEED_SETGRENT_R 1
|
||||
#define NEED_ENDGRENT_R 1
|
||||
|
||||
/* #undef NEED_INNETGR_R */
|
||||
#define NEED_INNETGR_R 1
|
||||
/* #undef NEED_SETNETGRENT_R */
|
||||
/* #undef NEED_ENDNETGRENT_R */
|
||||
#define NEED_ENDNETGRENT_R 1
|
||||
|
||||
/* #undef NEED_GETPWNAM_R */
|
||||
/* #undef NEED_GETPWUID_R */
|
||||
/* #undef NEED_SETPWENT_R */
|
||||
/* #undef NEED_SETPASSENT_R */
|
||||
/* #undef NEED_SETPWENT_R */
|
||||
/* #undef NEED_GETPWENT_R */
|
||||
/* #undef NEED_ENDPWENT_R */
|
||||
#define NEED_GETPWNAM_R 1
|
||||
#define NEED_GETPWUID_R 1
|
||||
#define NEED_SETPWENT_R 1
|
||||
#define NEED_SETPASSENT_R 1
|
||||
#define NEED_SETPWENT_R 1
|
||||
#define NEED_GETPWENT_R 1
|
||||
#define NEED_ENDPWENT_R 1
|
||||
|
||||
/* #undef NEED_SETPASSENT */
|
||||
#define NEED_SETPASSENT 1
|
||||
|
||||
/* #undef HAS_PW_CLASS */
|
||||
|
||||
@ -43,4 +43,12 @@ struct __sFILE;
|
||||
extern __inline int __sputaux(int _c, struct __sFILE *_p);
|
||||
#endif
|
||||
/* #undef BROKEN_IN6ADDR_INIT_MACROS */
|
||||
#define HAVE_STRLCAT 1
|
||||
/* #undef HAVE_STRLCAT */
|
||||
/* Shut up warnings about missing braces */
|
||||
/* #undef SHUTUP_MUTEX_INITIALIZER */
|
||||
#ifdef SHUTUP_MUTEX_INITIALIZER
|
||||
#define LIBBIND_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
|
||||
#else
|
||||
#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/network/libbind/dst/dst_api.c,v 1.1 2004/04/15 16:03:27 wkornew Exp $";
|
||||
static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/dst_api.c,v 1.4.2.6.8.1 2004/09/16 00:57:33 marka Exp $";
|
||||
#endif
|
||||
|
||||
/*
|
||||
@ -46,6 +46,7 @@ static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/n
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <memory.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
#include <sys/param.h>
|
||||
@ -860,7 +861,8 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, u_int16_t in_id,
|
||||
len = cnt;
|
||||
p = in_buff;
|
||||
|
||||
if (!dst_s_verify_str((const char **) &p, "Private-key-format: v")) {
|
||||
if (!dst_s_verify_str((const char **) (void *)&p,
|
||||
"Private-key-format: v")) {
|
||||
EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
|
||||
goto fail;
|
||||
}
|
||||
@ -878,7 +880,7 @@ dst_s_read_private_key_file(char *name, DST_KEY *pk_key, u_int16_t in_id,
|
||||
|
||||
while (*p++ != '\n') ; /* skip to end of line */
|
||||
|
||||
if (!dst_s_verify_str((const char **) &p, "Algorithm: "))
|
||||
if (!dst_s_verify_str((const char **) (void *)&p, "Algorithm: "))
|
||||
goto fail;
|
||||
|
||||
if (sscanf((char *)p, "%d", &alg) != 1)
|
||||
|
@ -73,7 +73,7 @@ typedef struct dst_key {
|
||||
#ifndef SAFE_FREE
|
||||
#define SAFE_FREE(a) \
|
||||
do{if(a != NULL){memset(a,0, sizeof(*a)); free(a); a=NULL;}} while (0)
|
||||
#define SAFE_FREE2(a,s) if (a != NULL && s > 0){memset(a,0, s);free(a); a=NULL;}
|
||||
#define SAFE_FREE2(a,s) if (a != NULL && (long)s > 0){memset(a,0, s);free(a); a=NULL;}
|
||||
#endif
|
||||
|
||||
typedef struct dst_func {
|
||||
|
@ -1,6 +1,6 @@
|
||||
#ifdef HMAC_MD5
|
||||
#ifndef LINT
|
||||
static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/network/libbind/dst/hmac_link.c,v 1.1 2004/04/15 16:03:27 wkornew Exp $";
|
||||
static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/hmac_link.c,v 1.2.2.1 2003/06/27 03:51:36 marka Exp $";
|
||||
#endif
|
||||
/*
|
||||
* Portions Copyright (c) 1995-1998 by Trusted Information Systems, Inc.
|
||||
|
@ -99,7 +99,7 @@ unsigned long len;
|
||||
int sw,sc;
|
||||
ULONG l;
|
||||
|
||||
if (len == 0) return;
|
||||
if (len == 0U) return;
|
||||
|
||||
l=(c->Nl+(len<<3))&0xffffffffL;
|
||||
/* 95-05-24 eay Fixed a bug with the overflow handling, thanks to
|
||||
@ -115,7 +115,7 @@ unsigned long len;
|
||||
sw=c->num>>2;
|
||||
sc=c->num&0x03;
|
||||
|
||||
if ((c->num+len) >= MD5_CBLOCK)
|
||||
if ((c->num+len) >= (size_t)MD5_CBLOCK)
|
||||
{
|
||||
l= p[sw];
|
||||
p_c2l(data,l,sc);
|
||||
@ -136,7 +136,7 @@ unsigned long len;
|
||||
int ew,ec;
|
||||
|
||||
c->num+=(int)len;
|
||||
if ((sc+len) < 4) /* ugly, add char's to a word */
|
||||
if ((sc+len) < 4U) /* ugly, add char's to a word */
|
||||
{
|
||||
l= p[sw];
|
||||
p_c2l_p(data,l,sc,len);
|
||||
@ -163,7 +163,7 @@ unsigned long len;
|
||||
/* we now can process the input data in blocks of MD5_CBLOCK
|
||||
* chars and save the leftovers to c->data. */
|
||||
p=c->data;
|
||||
while (len >= MD5_CBLOCK)
|
||||
while (len >= (size_t)MD5_CBLOCK)
|
||||
{
|
||||
#if defined(L_ENDIAN) || defined(B_ENDIAN)
|
||||
memcpy(p,data,MD5_CBLOCK);
|
||||
|
@ -101,9 +101,9 @@
|
||||
switch (sc) \
|
||||
{ \
|
||||
case 0: l =((unsigned long)(*((c)++))); \
|
||||
if (--len == 0) break; \
|
||||
if (--len == 0U) break; \
|
||||
case 1: l|=((unsigned long)(*((c)++)))<< 8; \
|
||||
if (--len == 0) break; \
|
||||
if (--len == 0U) break; \
|
||||
case 2: l|=((unsigned long)(*((c)++)))<<16; \
|
||||
} \
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/network/libbind/dst/support.c,v 1.1 2004/04/15 16:03:28 wkornew Exp $";
|
||||
static const char rcsid[] = "$Header: /proj/cvs/prod/bind9/lib/bind/dst/support.c,v 1.2.2.1 2001/11/02 22:25:29 gson Exp $";
|
||||
|
||||
|
||||
/*
|
||||
@ -21,8 +21,8 @@ static const char rcsid[] = "$Header: /tmp/bonefish/open-beos/current/src/kits/n
|
||||
#include "port_before.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <memory.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -52,20 +52,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -156,7 +156,7 @@ inet_aton(const char *cp, struct in_addr *addr) {
|
||||
* a.b.c (with c treated as 16 bits)
|
||||
* a.b (with b treated as 24 bits)
|
||||
*/
|
||||
if (pp >= parts + 3 || val > 0xff)
|
||||
if (pp >= parts + 3 || val > 0xffU)
|
||||
return (0);
|
||||
*pp++ = val;
|
||||
c = *++cp;
|
||||
@ -183,19 +183,19 @@ inet_aton(const char *cp, struct in_addr *addr) {
|
||||
break;
|
||||
|
||||
case 2: /* a.b -- 8.24 bits */
|
||||
if (val > 0xffffff)
|
||||
if (val > 0xffffffU)
|
||||
return (0);
|
||||
val |= parts[0] << 24;
|
||||
break;
|
||||
|
||||
case 3: /* a.b.c -- 8.8.16 bits */
|
||||
if (val > 0xffff)
|
||||
if (val > 0xffffU)
|
||||
return (0);
|
||||
val |= (parts[0] << 24) | (parts[1] << 16);
|
||||
break;
|
||||
|
||||
case 4: /* a.b.c.d -- 8.8.8.8 bits */
|
||||
if (val > 0xff)
|
||||
if (val > 0xffU)
|
||||
return (0);
|
||||
val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
|
||||
break;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998,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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -121,7 +121,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
|
||||
if (bits == -1)
|
||||
len = 4;
|
||||
else
|
||||
for (len = 1, b = 1 ; b < 4; b++)
|
||||
for (len = 1, b = 1 ; b < 4U; b++)
|
||||
if (*(src + b))
|
||||
len = b + 1;
|
||||
|
||||
@ -130,7 +130,7 @@ inet_cidr_ntop_ipv4(const u_char *src, int bits, char *dst, size_t size) {
|
||||
if (len > bytes)
|
||||
bytes = len;
|
||||
b = decoct(src, bytes, dst, size);
|
||||
if (b == 0)
|
||||
if (b == 0U)
|
||||
goto emsgsize;
|
||||
dst += b;
|
||||
size -= b;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998,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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -98,7 +98,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
|
||||
if (tmp > 255)
|
||||
goto enoent;
|
||||
} while ((ch = *src++) != '\0' && isascii(ch) && isdigit(ch));
|
||||
if (size-- == 0)
|
||||
if (size-- == 0U)
|
||||
goto emsgsize;
|
||||
*dst++ = (u_char) tmp;
|
||||
if (ch == '\0' || ch == '/')
|
||||
@ -133,7 +133,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, int *pbits, int ipv6) {
|
||||
goto enoent;
|
||||
|
||||
/* Extend address to four octets. */
|
||||
while (size-- > 0)
|
||||
while (size-- > 0U)
|
||||
*dst++ = 0;
|
||||
|
||||
*pbits = bits;
|
||||
@ -251,7 +251,7 @@ inet_cidr_pton_ipv6(const char *src, u_char *dst, int *pbits) {
|
||||
return (-1);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
getbits(const char *src, int ipv6) {
|
||||
int bits = 0;
|
||||
char *cp, ch;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1995-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -51,16 +51,16 @@ struct in_addr
|
||||
inet_makeaddr(net, host)
|
||||
u_long net, host;
|
||||
{
|
||||
u_long addr;
|
||||
struct in_addr a;
|
||||
|
||||
if (net < 128)
|
||||
addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
|
||||
else if (net < 65536)
|
||||
addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
|
||||
if (net < 128U)
|
||||
a.s_addr = (net << IN_CLASSA_NSHIFT) | (host & IN_CLASSA_HOST);
|
||||
else if (net < 65536U)
|
||||
a.s_addr = (net << IN_CLASSB_NSHIFT) | (host & IN_CLASSB_HOST);
|
||||
else if (net < 16777216L)
|
||||
addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
|
||||
a.s_addr = (net << IN_CLASSC_NSHIFT) | (host & IN_CLASSC_HOST);
|
||||
else
|
||||
addr = net | host;
|
||||
addr = htonl(addr);
|
||||
return (*(struct in_addr *)&addr);
|
||||
a.s_addr = net | host;
|
||||
a.s_addr = htonl(a.s_addr);
|
||||
return (a);
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -24,7 +24,6 @@ static const char rcsid[] = "$Id$";
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/nameser.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include <errno.h>
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -59,7 +59,7 @@ static const char rcsid[] = "$Id$";
|
||||
* Paul Vixie (ISC), June 1996
|
||||
*/
|
||||
static int
|
||||
inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
||||
inet_net_pton_ipv4(const char *src, u_char *dst, size_t size) {
|
||||
static const char xdigits[] = "0123456789abcdef";
|
||||
static const char digits[] = "0123456789";
|
||||
int n, ch, tmp = 0, dirty, bits;
|
||||
@ -70,7 +70,7 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
||||
&& isascii((unsigned char)(src[1]))
|
||||
&& isxdigit((unsigned char)(src[1]))) {
|
||||
/* Hexadecimal: Eat nybble string. */
|
||||
if (size <= 0)
|
||||
if (size <= 0U)
|
||||
goto emsgsize;
|
||||
dirty = 0;
|
||||
src++; /* skip x or X. */
|
||||
@ -84,14 +84,14 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
||||
else
|
||||
tmp = (tmp << 4) | n;
|
||||
if (++dirty == 2) {
|
||||
if (size-- <= 0)
|
||||
if (size-- <= 0U)
|
||||
goto emsgsize;
|
||||
*dst++ = (u_char) tmp;
|
||||
dirty = 0;
|
||||
}
|
||||
}
|
||||
if (dirty) { /* Odd trailing nybble? */
|
||||
if (size-- <= 0)
|
||||
if (size-- <= 0U)
|
||||
goto emsgsize;
|
||||
*dst++ = (u_char) (tmp << 4);
|
||||
}
|
||||
@ -108,7 +108,7 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
||||
goto enoent;
|
||||
} while ((ch = *src++) != '\0' &&
|
||||
isascii(ch) && isdigit(ch));
|
||||
if (size-- <= 0)
|
||||
if (size-- <= 0U)
|
||||
goto emsgsize;
|
||||
*dst++ = (u_char) tmp;
|
||||
if (ch == '\0' || ch == '/')
|
||||
@ -152,7 +152,7 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
||||
if (*odst >= 240) /* Class E */
|
||||
bits = 32;
|
||||
else if (*odst >= 224) /* Class D */
|
||||
bits = 4;
|
||||
bits = 8;
|
||||
else if (*odst >= 192) /* Class C */
|
||||
bits = 24;
|
||||
else if (*odst >= 128) /* Class B */
|
||||
@ -160,12 +160,18 @@ inet_net_pton_ipv4( const char *src, u_char *dst, size_t size) {
|
||||
else /* Class A */
|
||||
bits = 8;
|
||||
/* If imputed mask is narrower than specified octets, widen. */
|
||||
if (bits >= 8 && bits < ((dst - odst) * 8))
|
||||
if (bits < ((dst - odst) * 8))
|
||||
bits = (dst - odst) * 8;
|
||||
/*
|
||||
* If there are no additional bits specified for a class D
|
||||
* address adjust bits to 4.
|
||||
*/
|
||||
if (bits == 8 && *odst == 224)
|
||||
bits = 4;
|
||||
}
|
||||
/* Extend network to cover the actual mask. */
|
||||
while (bits > ((dst - odst) * 8)) {
|
||||
if (size-- <= 0)
|
||||
if (size-- <= 0U)
|
||||
goto emsgsize;
|
||||
*dst++ = '\0';
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -66,14 +66,14 @@ again:
|
||||
base = 16, cp++;
|
||||
while ((c = *cp) != 0) {
|
||||
if (isdigit((unsigned char)c)) {
|
||||
if (base == 8 && (c == '8' || c == '9'))
|
||||
if (base == 8U && (c == '8' || c == '9'))
|
||||
return (INADDR_NONE);
|
||||
val = (val * base) + (c - '0');
|
||||
cp++;
|
||||
digit = 1;
|
||||
continue;
|
||||
}
|
||||
if (base == 16 && isxdigit((unsigned char)c)) {
|
||||
if (base == 16U && isxdigit((unsigned char)c)) {
|
||||
val = (val << 4) +
|
||||
(c + 10 - (islower((unsigned char)c) ? 'a' : 'A'));
|
||||
cp++;
|
||||
@ -85,7 +85,7 @@ again:
|
||||
if (!digit)
|
||||
return (INADDR_NONE);
|
||||
if (*cp == '.') {
|
||||
if (pp >= parts + 4 || val > 0xff)
|
||||
if (pp >= parts + 4 || val > 0xffU)
|
||||
return (INADDR_NONE);
|
||||
*pp++ = val, cp++;
|
||||
goto again;
|
||||
@ -94,7 +94,7 @@ again:
|
||||
return (INADDR_NONE);
|
||||
*pp++ = val;
|
||||
n = pp - parts;
|
||||
if (n > 4)
|
||||
if (n > 4U)
|
||||
return (INADDR_NONE);
|
||||
for (val = 0, i = 0; i < n; i++) {
|
||||
val <<= 8;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAI!
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANT!
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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 TH!
|
||||
* SOFTWARE.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -118,7 +118,7 @@ dns_res_get(struct irs_acc *this) {
|
||||
dns_res_set(this, res, free);
|
||||
}
|
||||
|
||||
if ((dns->res->options & RES_INIT) == 0 &&
|
||||
if ((dns->res->options & RES_INIT) == 0U &&
|
||||
res_ninit(dns->res) < 0)
|
||||
return (NULL);
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* from gethostnamadr.c 8.1 (Berkeley) 6/4/93 */
|
||||
@ -386,7 +386,7 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
|
||||
q2->qtype = T_PTR;
|
||||
q2->answer = q2->qbuf.buf;
|
||||
q2->anslen = sizeof(q2->qbuf);
|
||||
if ((pvt->res->options & RES_NO_NIBBLE2) != 0)
|
||||
if ((pvt->res->options & RES_NO_NIBBLE2) != 0U)
|
||||
q2->action = RESTGT_IGNORE;
|
||||
else
|
||||
q2->action = RESTGT_AFTERFAILURE;
|
||||
@ -414,38 +414,44 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
|
||||
break;
|
||||
case AF_INET6:
|
||||
if (q->action != RESTGT_IGNORE) {
|
||||
const char *nibsuff = res_get_nibblesuffix(pvt->res);
|
||||
qp = q->qname;
|
||||
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
||||
i = SPRINTF((qp, "%x.%x.",
|
||||
uaddr[n] & 0xf,
|
||||
(uaddr[n] >> 4) & 0xf));
|
||||
if (i < 0)
|
||||
if (i != 4)
|
||||
abort();
|
||||
qp += i;
|
||||
}
|
||||
#ifdef HAVE_STRLCAT
|
||||
strlcat(q->qname, res_get_nibblesuffix(pvt->res),
|
||||
sizeof(q->qname));
|
||||
#else
|
||||
strcpy(qp, res_get_nibblesuffix(pvt->res));
|
||||
#endif
|
||||
if (strlen(q->qname) + strlen(nibsuff) + 1 >
|
||||
sizeof q->qname) {
|
||||
errno = ENAMETOOLONG;
|
||||
RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
|
||||
hp = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
strcpy(qp, nibsuff); /* (checked) */
|
||||
}
|
||||
if (q2->action != RESTGT_IGNORE) {
|
||||
const char *nibsuff2 = res_get_nibblesuffix2(pvt->res);
|
||||
qp = q2->qname;
|
||||
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
|
||||
i = SPRINTF((qp, "%x.%x.",
|
||||
uaddr[n] & 0xf,
|
||||
(uaddr[n] >> 4) & 0xf));
|
||||
if (i < 0)
|
||||
if (i != 4)
|
||||
abort();
|
||||
qp += i;
|
||||
}
|
||||
#ifdef HAVE_STRLCAT
|
||||
strlcat(q->qname, res_get_nibblesuffix2(pvt->res),
|
||||
sizeof(q->qname));
|
||||
#else
|
||||
strcpy(qp, res_get_nibblesuffix2(pvt->res));
|
||||
#endif
|
||||
if (strlen(q2->qname) + strlen(nibsuff2) + 1 >
|
||||
sizeof q2->qname) {
|
||||
errno = ENAMETOOLONG;
|
||||
RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
|
||||
hp = NULL;
|
||||
goto cleanup;
|
||||
}
|
||||
strcpy(qp, nibsuff2); /* (checked) */
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -820,11 +826,7 @@ gethostans(struct irs_ho *this,
|
||||
had_error++;
|
||||
continue;
|
||||
}
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(bp, tbuf, ep - bp);
|
||||
#else
|
||||
strcpy(bp, tbuf);
|
||||
#endif
|
||||
strcpy(bp, tbuf); /* (checked) */
|
||||
pvt->host.h_name = bp;
|
||||
hname = bp;
|
||||
bp += n;
|
||||
@ -838,7 +840,7 @@ gethostans(struct irs_ho *this,
|
||||
}
|
||||
cp += n;
|
||||
#ifdef RES_USE_DNAME
|
||||
if ((pvt->res->options & RES_USE_DNAME) != 0)
|
||||
if ((pvt->res->options & RES_USE_DNAME) != 0U)
|
||||
#endif
|
||||
{
|
||||
/*
|
||||
@ -856,11 +858,7 @@ gethostans(struct irs_ho *this,
|
||||
had_error++;
|
||||
continue;
|
||||
}
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(bp, tbuf, ep - bp);
|
||||
#else
|
||||
strcpy(bp, tbuf);
|
||||
#endif
|
||||
strcpy(bp, tbuf); /* (checked) */
|
||||
tname = bp;
|
||||
bp += n;
|
||||
continue;
|
||||
@ -996,11 +994,7 @@ gethostans(struct irs_ho *this,
|
||||
n = strlen(qname) + 1; /* for the \0 */
|
||||
if (n > (ep - bp) || n >= MAXHOSTNAMELEN)
|
||||
goto no_recovery;
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(bp, qname, ep - bp);
|
||||
#else
|
||||
strcpy(bp, qname);
|
||||
#endif
|
||||
strcpy(bp, qname); /* (checked) */
|
||||
pvt->host.h_name = bp;
|
||||
bp += n;
|
||||
}
|
||||
@ -1149,7 +1143,7 @@ init(struct irs_ho *this) {
|
||||
|
||||
if (!pvt->res && !ho_res_get(this))
|
||||
return (-1);
|
||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
res_ninit(pvt->res) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -349,12 +349,7 @@ get1101answer(struct irs_nw *this,
|
||||
RES_SET_H_ERRNO(pvt->res, NO_RECOVERY);
|
||||
return (NULL);
|
||||
}
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(bp, name, ep - bp);
|
||||
pvt->net.n_name = bp;
|
||||
#else
|
||||
pvt->net.n_name = strcpy(bp, name);
|
||||
#endif
|
||||
pvt->net.n_name = strcpy(bp, name); /* (checked) */
|
||||
bp += n;
|
||||
}
|
||||
break;
|
||||
@ -574,7 +569,7 @@ normalize_name(char *name) {
|
||||
/* Make lower case. */
|
||||
for (t = name; *t; t++)
|
||||
if (isascii((unsigned char)*t) && isupper((unsigned char)*t))
|
||||
*t = tolower(*t);
|
||||
*t = tolower((*t)&0xff);
|
||||
|
||||
/* Remove trailing dots. */
|
||||
while (t > name && t[-1] == '.')
|
||||
@ -587,7 +582,7 @@ init(struct irs_nw *this) {
|
||||
|
||||
if (!pvt->res && !nw_res_get(this))
|
||||
return (-1);
|
||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
res_ninit(pvt->res) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -22,7 +22,7 @@
|
||||
#ifndef _DNS_P_H_INCLUDED
|
||||
#define _DNS_P_H_INCLUDED
|
||||
|
||||
#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0 || \
|
||||
#define maybe_ok(res, nm, ok) (((res)->options & RES_NOCHECKNAME) != 0U || \
|
||||
(ok)(nm) != 0)
|
||||
#define maybe_hnok(res, hn) maybe_ok((res), (hn), res_hnok)
|
||||
#define maybe_dnok(res, dn) maybe_ok((res), (dn), res_dnok)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 2001 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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>
|
||||
@ -52,6 +52,9 @@ gai_strerror(int ecode) {
|
||||
#ifndef DO_PTHREADS
|
||||
static char buf[EAI_BUFSIZE];
|
||||
#else /* DO_PTHREADS */
|
||||
#ifndef LIBBIND_MUTEX_INITIALIZER
|
||||
#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
static pthread_mutex_t lock;
|
||||
static pthread_key_t key;
|
||||
static int once = 0;
|
||||
@ -63,9 +66,8 @@ gai_strerror(int ecode) {
|
||||
|
||||
#ifdef DO_PTHREADS
|
||||
if (!once) {
|
||||
// Haiku compatibility: this is a function call, thus it must be
|
||||
// initialized here and not at when allocating 'lock'
|
||||
lock = PTHREAD_MUTEX_INITIALIZER;
|
||||
/* XXX: Haiku has non-constant mutex initializer! Must init here. */
|
||||
lock = LIBBIND_MUTEX_INITIALIZER;
|
||||
|
||||
pthread_mutex_lock(&lock);
|
||||
if (!once++)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -175,7 +175,7 @@ gen_res_get(struct irs_acc *this) {
|
||||
gen_res_set(this, res, free);
|
||||
}
|
||||
|
||||
if (((irs->res->options & RES_INIT) == 0) && res_ninit(irs->res) < 0)
|
||||
if (((irs->res->options & RES_INIT) == 0U) && res_ninit(irs->res) < 0)
|
||||
return (NULL);
|
||||
|
||||
return (irs->res);
|
||||
@ -391,8 +391,10 @@ init_map_rules(struct gen_p *irs, const char *conf_file) {
|
||||
default_map_rules(irs);
|
||||
return;
|
||||
}
|
||||
(void) sprintf(pattern, "%%%ds %%%ds %%%ds\n",
|
||||
sizeof mapname, sizeof accname, sizeof options);
|
||||
(void) sprintf(pattern, "%%%lus %%%lus %%%lus\n",
|
||||
(unsigned long)sizeof mapname,
|
||||
(unsigned long)sizeof accname,
|
||||
(unsigned long)sizeof options);
|
||||
while (fgets(line, sizeof line, conf)) {
|
||||
enum irs_map_id map;
|
||||
enum irs_acc_id acc;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -83,7 +83,7 @@ static void gr_res_set(struct irs_gr *,
|
||||
struct __res_state *,
|
||||
void (*)(void *));
|
||||
|
||||
static void grmerge(struct irs_gr *gr, const struct group *src,
|
||||
static int grmerge(struct irs_gr *gr, const struct group *src,
|
||||
int preserve);
|
||||
|
||||
static int countvec(char **vec);
|
||||
@ -92,6 +92,10 @@ static int countnew(char **old, char **new);
|
||||
static size_t sizenew(char **old, char **new);
|
||||
static int newgid(int, gid_t *, gid_t);
|
||||
|
||||
/* Macros */
|
||||
|
||||
#define FREE_IF(x) do { if ((x) != NULL) { free(x); (x) = NULL; } } while (0)
|
||||
|
||||
/* Public */
|
||||
|
||||
struct irs_gr *
|
||||
@ -171,7 +175,8 @@ gr_byname(struct irs_gr *this, const char *name) {
|
||||
gr = rule->inst->gr;
|
||||
tval = (*gr->byname)(gr, name);
|
||||
if (tval) {
|
||||
grmerge(this, tval, dirty++);
|
||||
if (!grmerge(this, tval, dirty++))
|
||||
return (NULL);
|
||||
if (!(rule->flags & IRS_MERGE))
|
||||
break;
|
||||
} else {
|
||||
@ -197,7 +202,8 @@ gr_bygid(struct irs_gr *this, gid_t gid) {
|
||||
gr = rule->inst->gr;
|
||||
tval = (*gr->bygid)(gr, gid);
|
||||
if (tval) {
|
||||
grmerge(this, tval, dirty++);
|
||||
if (!grmerge(this, tval, dirty++))
|
||||
return (NULL);
|
||||
if (!(rule->flags & IRS_MERGE))
|
||||
break;
|
||||
} else {
|
||||
@ -321,7 +327,7 @@ gr_res_set(struct irs_gr *this, struct __res_state *res,
|
||||
|
||||
/* Private. */
|
||||
|
||||
static void
|
||||
static int
|
||||
grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||
struct pvt *pvt = (struct pvt *)this->private;
|
||||
char *cp, **m, **p, *oldmembuf, *ep;
|
||||
@ -332,9 +338,9 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||
pvt->group.gr_gid = src->gr_gid;
|
||||
if (pvt->nmemb < 1) {
|
||||
m = malloc(sizeof *m);
|
||||
if (!m) {
|
||||
if (m == NULL) {
|
||||
/* No harm done, no work done. */
|
||||
return;
|
||||
return (0);
|
||||
}
|
||||
pvt->group.gr_mem = m;
|
||||
pvt->nmemb = 1;
|
||||
@ -351,9 +357,9 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||
n = ndst + nnew + 1;
|
||||
if ((size_t)n > pvt->nmemb) {
|
||||
m = realloc(pvt->group.gr_mem, n * sizeof *m);
|
||||
if (!m) {
|
||||
if (m == NULL) {
|
||||
/* No harm done, no work done. */
|
||||
return;
|
||||
return (0);
|
||||
}
|
||||
pvt->group.gr_mem = m;
|
||||
pvt->nmemb = n;
|
||||
@ -371,13 +377,13 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||
}
|
||||
if (n == 0) {
|
||||
/* No work to do. */
|
||||
return;
|
||||
return (1);
|
||||
}
|
||||
used = preserve ? pvt->membufsize : 0;
|
||||
cp = malloc(used + n);
|
||||
if (!cp) {
|
||||
if (cp == NULL) {
|
||||
/* No harm done, no work done. */
|
||||
return;
|
||||
return (0);
|
||||
}
|
||||
ep = cp + used + n;
|
||||
if (used != 0)
|
||||
@ -401,12 +407,13 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||
if (isnew(pvt->group.gr_mem, *m)) {
|
||||
*p++ = cp;
|
||||
*p = NULL;
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(cp, *m, ep - cp);
|
||||
#else
|
||||
strcpy(cp, *m);
|
||||
#endif
|
||||
cp += strlen(cp) + 1;
|
||||
n = strlen(*m) + 1;
|
||||
if (n > ep - cp) {
|
||||
FREE_IF(oldmembuf);
|
||||
return (0);
|
||||
}
|
||||
strcpy(cp, *m); /* (checked) */
|
||||
cp += n;
|
||||
}
|
||||
if (preserve) {
|
||||
pvt->group.gr_name = pvt->membuf +
|
||||
@ -415,23 +422,26 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
|
||||
(pvt->group.gr_passwd - oldmembuf);
|
||||
} else {
|
||||
pvt->group.gr_name = cp;
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(cp, src->gr_name, ep - cp);
|
||||
#else
|
||||
strcpy(cp, src->gr_name);
|
||||
#endif
|
||||
cp += strlen(src->gr_name) + 1;
|
||||
pvt->group.gr_passwd = cp;
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(cp, src->gr_passwd, ep - cp);
|
||||
#else
|
||||
strcpy(cp, src->gr_passwd);
|
||||
#endif
|
||||
cp += strlen(src->gr_passwd) + 1;
|
||||
n = strlen(src->gr_name) + 1;
|
||||
if (n > ep - cp) {
|
||||
FREE_IF(oldmembuf);
|
||||
return (0);
|
||||
}
|
||||
if (oldmembuf != NULL)
|
||||
free(oldmembuf);
|
||||
strcpy(cp, src->gr_name); /* (checked) */
|
||||
cp += n;
|
||||
|
||||
pvt->group.gr_passwd = cp;
|
||||
n = strlen(src->gr_passwd) + 1;
|
||||
if (n > ep - cp) {
|
||||
FREE_IF(oldmembuf);
|
||||
return (0);
|
||||
}
|
||||
strcpy(cp, src->gr_passwd); /* (checked) */
|
||||
cp += n;
|
||||
}
|
||||
FREE_IF(oldmembuf);
|
||||
INSIST(cp >= pvt->membuf && cp <= &pvt->membuf[pvt->membufsize]);
|
||||
return (1);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -383,7 +383,7 @@ init(struct irs_ho *this) {
|
||||
if (!pvt->res && !ho_res_get(this))
|
||||
return (-1);
|
||||
|
||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
(res_ninit(pvt->res) == -1))
|
||||
return (-1);
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -255,7 +255,7 @@ init(struct irs_nw *this) {
|
||||
|
||||
if (!pvt->res && !nw_res_get(this))
|
||||
return (-1);
|
||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
res_ninit(pvt->res) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -937,11 +937,7 @@ copy_ai(pai)
|
||||
free(ai);
|
||||
return NULL;
|
||||
}
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(ai->ai_canonname, pai->ai_canonname, l);
|
||||
#else
|
||||
strncpy(ai->ai_canonname, pai->ai_canonname, l);
|
||||
#endif
|
||||
strcpy(ai->ai_canonname, pai->ai_canonname); /* (checked) */
|
||||
} else {
|
||||
/* just to make sure */
|
||||
ai->ai_canonname = NULL;
|
||||
@ -1096,7 +1092,8 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6,
|
||||
return (0);
|
||||
|
||||
#ifdef USE_IFNAMELINKID
|
||||
if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6)) {
|
||||
if (IN6_IS_ADDR_LINKLOCAL(a6) || IN6_IS_ADDR_MC_LINKLOCAL(a6) ||
|
||||
IN6_IS_ADDR_MC_NODELOCAL(a6)) {
|
||||
/*
|
||||
* Using interface names as link indices can be allowed
|
||||
* only when we can assume a one-to-one mappings between
|
||||
@ -1104,6 +1101,7 @@ ip6_str2scopeid(char *scope, struct sockaddr_in6 *sin6,
|
||||
*/
|
||||
scopeid = if_nametoindex(scope);
|
||||
if (scopeid == 0)
|
||||
goto trynumeric;
|
||||
*scopeidp = scopeid;
|
||||
return (1);
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -187,7 +187,7 @@ gethostent_p(struct net_data *net_data) {
|
||||
return (NULL);
|
||||
while ((hp = (*ho->next)(ho)) != NULL &&
|
||||
hp->h_addrtype == AF_INET6 &&
|
||||
(net_data->res->options & RES_USE_INET6) == 0)
|
||||
(net_data->res->options & RES_USE_INET6) == 0U)
|
||||
continue;
|
||||
net_data->ho_last = hp;
|
||||
return (net_data->ho_last);
|
||||
@ -356,13 +356,13 @@ getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
|
||||
|
||||
switch (af) {
|
||||
case AF_INET:
|
||||
if (len != INADDRSZ) {
|
||||
if (len != (size_t)INADDRSZ) {
|
||||
*error_num = NO_RECOVERY;
|
||||
return (NULL);
|
||||
}
|
||||
break;
|
||||
case AF_INET6:
|
||||
if (len != IN6ADDRSZ) {
|
||||
if (len != (size_t)IN6ADDRSZ) {
|
||||
*error_num = NO_RECOVERY;
|
||||
return (NULL);
|
||||
}
|
||||
@ -1007,7 +1007,7 @@ fakeaddr(const char *name, int af, struct net_data *net_data) {
|
||||
}
|
||||
strncpy(pvt->name, name, NS_MAXDNAME);
|
||||
pvt->name[NS_MAXDNAME] = '\0';
|
||||
if (af == AF_INET && (net_data->res->options & RES_USE_INET6) != 0) {
|
||||
if (af == AF_INET && (net_data->res->options & RES_USE_INET6) != 0U) {
|
||||
map_v4v6_address(pvt->addr, pvt->addr);
|
||||
af = AF_INET6;
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -47,7 +47,7 @@ gethostbyname_r(const char *name, struct hostent *hptr, HOST_R_ARGS) {
|
||||
HOST_R_ERRNO;
|
||||
|
||||
#ifdef HOST_R_SETANSWER
|
||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) == 0)
|
||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
|
||||
*answerp = NULL;
|
||||
else
|
||||
*answerp = hptr;
|
||||
@ -72,7 +72,7 @@ gethostbyaddr_r(const char *addr, int len, int type,
|
||||
HOST_R_ERRNO;
|
||||
|
||||
#ifdef HOST_R_SETANSWER
|
||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) == 0)
|
||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
|
||||
*answerp = NULL;
|
||||
else
|
||||
*answerp = hptr;
|
||||
@ -102,7 +102,7 @@ gethostent_r(struct hostent *hptr, HOST_R_ARGS) {
|
||||
HOST_R_ERRNO;
|
||||
|
||||
#ifdef HOST_R_SETANSWER
|
||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) == 0)
|
||||
if (he == NULL || (n = copy_hostent(he, hptr, HOST_R_COPY)) != 0)
|
||||
*answerp = NULL;
|
||||
else
|
||||
*answerp = hptr;
|
||||
@ -214,8 +214,8 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) {
|
||||
|
||||
/* copy up to first 35 addresses */
|
||||
i = 0;
|
||||
cp = hdptr->hostaddr;
|
||||
eob = hdptr->hostaddr + sizeof(hdptr->hostaddr);
|
||||
cp = hdptr->hostbuf;
|
||||
eob = hdptr->hostbuf + sizeof(hdptr->hostbuf);
|
||||
hptr->h_addr_list = hdptr->h_addr_ptrs;
|
||||
while (he->h_addr_list[i] && i < (_MAXADDRS)) {
|
||||
if (n < (eob - cp)) {
|
||||
@ -230,8 +230,6 @@ copy_hostent(struct hostent *he, struct hostent *hptr, HOST_R_COPY_ARGS) {
|
||||
hptr->h_addr_list[i] = NULL;
|
||||
|
||||
/* copy official name */
|
||||
cp = hdptr->hostbuf;
|
||||
eob = hdptr->hostbuf + sizeof(hdptr->hostbuf);
|
||||
if ((n = strlen(he->h_name) + 1) < (eob - cp)) {
|
||||
strcpy(cp, he->h_name);
|
||||
hptr->h_name = cp;
|
||||
|
@ -132,7 +132,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
||||
port = ((const struct sockinet *)sa)->si_port; /* network byte order */
|
||||
addr = (const char *)sa + afd->a_off;
|
||||
|
||||
if (serv == NULL || servlen == 0) {
|
||||
if (serv == NULL || servlen == 0U) {
|
||||
/*
|
||||
* rfc2553bis says that serv == NULL or servlen == 0 means that
|
||||
* the caller does not want the result.
|
||||
@ -154,7 +154,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
||||
|
||||
switch (sa->sa_family) {
|
||||
case AF_INET:
|
||||
if (ntohl(*(const u_long *)addr) >> IN_CLASSA_NSHIFT == 0)
|
||||
if (ntohl(*(const u_int32_t *)addr) >> IN_CLASSA_NSHIFT == 0)
|
||||
flags |= NI_NUMERICHOST;
|
||||
break;
|
||||
case AF_INET6:
|
||||
@ -177,7 +177,7 @@ getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (host == NULL || hostlen == 0) {
|
||||
if (host == NULL || hostlen == 0U) {
|
||||
/*
|
||||
* rfc2553bis says that host == NULL or hostlen == 0 means that
|
||||
* the caller does not want the result.
|
||||
@ -283,7 +283,7 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf,
|
||||
#ifdef NI_NUMERICSCOPE
|
||||
if (flags & NI_NUMERICSCOPE) {
|
||||
sprintf(tmp, "%u", sa6->sin6_scope_id);
|
||||
if (bufsiz != 0) {
|
||||
if (bufsiz != 0U) {
|
||||
strncpy(buf, tmp, bufsiz - 1);
|
||||
buf[bufsiz - 1] = '\0';
|
||||
}
|
||||
@ -313,7 +313,7 @@ ip6_sa2str(const struct sockaddr_in6 *sa6, char *buf,
|
||||
|
||||
/* last resort */
|
||||
sprintf(tmp, "%u", sa6->sin6_scope_id);
|
||||
if (bufsiz != 0) {
|
||||
if (bufsiz != 0U) {
|
||||
strncpy(buf, tmp, bufsiz - 1);
|
||||
buf[bufsiz - 1] = '\0';
|
||||
}
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -156,13 +156,13 @@ getnetbyaddr_p(unsigned long net, int type, struct net_data *net_data) {
|
||||
return (net_data->nw_last);
|
||||
|
||||
/* cannonize net(host order) */
|
||||
if (net < 256) {
|
||||
if (net < 256UL) {
|
||||
net <<= 24;
|
||||
bits = 8;
|
||||
} else if (net < 65536) {
|
||||
} else if (net < 65536UL) {
|
||||
net <<= 16;
|
||||
bits = 16;
|
||||
} else if (net < 16777216) {
|
||||
} else if (net < 16777216UL) {
|
||||
net <<= 8;
|
||||
bits = 24;
|
||||
} else
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -76,7 +76,9 @@ setnetgrent_r(const char *netgroup, NGR_R_ENT_ARGS)
|
||||
setnetgrent_r(const char *netgroup)
|
||||
#endif
|
||||
{
|
||||
setnetgrent(netgroup);
|
||||
char *tmp;
|
||||
DE_CONST(netgroup, tmp);
|
||||
setnetgrent(tmp);
|
||||
#ifdef NGR_R_PRIVATE
|
||||
*buf = NULL;
|
||||
#endif
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -36,6 +36,7 @@ static int __bind_irs_pw_unneeded;
|
||||
#include <pwd.h>
|
||||
#include <resolv.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <irs.h>
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -130,7 +130,7 @@ getpwuid_r(uid_t uid, struct passwd *pwptr, char *buf, int buflen) {
|
||||
PASS_R_RETURN
|
||||
getpwent_r(struct passwd *pwptr, PASS_R_ARGS) {
|
||||
struct passwd *pw = getpwent();
|
||||
int res;
|
||||
int res = 0;
|
||||
|
||||
if (pw == NULL)
|
||||
return (PASS_R_BAD);
|
||||
@ -184,7 +184,7 @@ endpwent_r(void)
|
||||
PASS_R_RETURN
|
||||
fgetpwent_r(FILE *f, struct passwd *pwptr, PASS_R_COPY_ARGS) {
|
||||
struct passwd *pw = fgetpwent(f);
|
||||
int res;
|
||||
int res = 0;
|
||||
|
||||
if (pw == NULL)
|
||||
return (PASS_R_BAD);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1998-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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -3,20 +3,20 @@ static const char rcsid[] = "$Id$";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -92,19 +92,14 @@ hesiod_init(void **context) {
|
||||
/*
|
||||
* Use compiled in defaults.
|
||||
*/
|
||||
ctx->LHS = malloc(strlen(DEF_LHS)+1);
|
||||
ctx->RHS = malloc(strlen(DEF_RHS)+1);
|
||||
if (ctx->LHS == 0 || ctx->RHS == 0) {
|
||||
ctx->LHS = malloc(strlen(DEF_LHS) + 1);
|
||||
ctx->RHS = malloc(strlen(DEF_RHS) + 1);
|
||||
if (ctx->LHS == NULL || ctx->RHS == NULL) {
|
||||
errno = ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(ctx->LHS, DEF_LHS, strlen(DEF_LHS) + 1);
|
||||
strlcpy(ctx->RHS, DEF_RHS, strlen(DEF_RHS) + 1);
|
||||
#else
|
||||
strcpy(ctx->LHS, DEF_LHS);
|
||||
strcpy(ctx->RHS, DEF_RHS);
|
||||
#endif
|
||||
strcpy(ctx->LHS, DEF_LHS); /* (checked) */
|
||||
strcpy(ctx->RHS, DEF_RHS); /* (checked) */
|
||||
#else
|
||||
goto cleanup;
|
||||
#endif
|
||||
@ -123,22 +118,10 @@ hesiod_init(void **context) {
|
||||
goto cleanup;
|
||||
}
|
||||
if (cp[0] == '.') {
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(ctx->RHS, cp, RHSlen);
|
||||
#else
|
||||
strcpy(ctx->RHS, cp);
|
||||
#endif
|
||||
strcpy(ctx->RHS, cp); /* (checked) */
|
||||
} else {
|
||||
#ifdef HAVE_STRLCPY
|
||||
strlcpy(ctx->RHS, ".", RHSlen);
|
||||
#else
|
||||
strcpy(ctx->RHS, ".");
|
||||
#endif
|
||||
#ifdef HAVE_STRLCAT
|
||||
strlcat(ctx->RHS, cp, RHSlen);
|
||||
#else
|
||||
strcat(ctx->RHS, cp);
|
||||
#endif
|
||||
strcpy(ctx->RHS, "."); /* (checked) */
|
||||
strcat(ctx->RHS, cp); /* (checked) */
|
||||
}
|
||||
}
|
||||
|
||||
@ -516,7 +499,7 @@ init(struct hesiod_p *ctx) {
|
||||
if (!ctx->res && !__hesiod_res_get(ctx))
|
||||
return (-1);
|
||||
|
||||
if (((ctx->res->options & RES_INIT) == 0) &&
|
||||
if (((ctx->res->options & RES_INIT) == 0U) &&
|
||||
(res_ninit(ctx->res) == -1))
|
||||
return (-1);
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996, 1998 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -387,7 +387,7 @@ irs_irp_read_response(struct irp_p *pvt, char *text, size_t textlen) {
|
||||
|
||||
if (sscanf(line, "%d", &code) != 1) {
|
||||
code = 0;
|
||||
} else if (text != NULL && textlen > 0) {
|
||||
} else if (text != NULL && textlen > 0U) {
|
||||
p = line;
|
||||
while (isspace((unsigned char)*p)) p++;
|
||||
while (isdigit((unsigned char)*p)) p++;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright(c) 1996, 1998 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (c) 1996,1998 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996, 1998 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (c) 1996,1998 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Copyright (c) 1996 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (c) 1996 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (c) 1996 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (c) 1996,1998 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* Portions Copyright (c) 1996 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -508,7 +508,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
|
||||
|
||||
/* gr_name field */
|
||||
name = NULL;
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -523,7 +523,7 @@ irp_unmarshall_gr(struct group *gr, char *buffer) {
|
||||
/* gr_gid field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
t = strtol(tmpbuf, &tb, 10);
|
||||
@ -679,7 +679,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
|
||||
|
||||
/* s_name field */
|
||||
name = NULL;
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -700,7 +700,7 @@ irp_unmarshall_sv(struct servent *sv, char *buffer) {
|
||||
/* s_port field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
t = strtol(tmpbuf, &tb, 10);
|
||||
@ -837,7 +837,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
|
||||
|
||||
/* p_name field */
|
||||
name = NULL;
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -858,7 +858,7 @@ int irp_unmarshall_pr(struct protoent *pr, char *buffer) {
|
||||
/* p_proto field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
t = strtol(tmpbuf, &tb, 10);
|
||||
@ -1040,7 +1040,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
|
||||
|
||||
/* h_name field */
|
||||
name = NULL;
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1061,7 +1061,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
|
||||
/* h_addrtype field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
if (strcmp(tmpbuf, "AF_INET") == 0)
|
||||
@ -1075,7 +1075,7 @@ irp_unmarshall_ho(struct hostent *ho, char *buffer) {
|
||||
/* h_length field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
t = strtol(tmpbuf, &tb, 10);
|
||||
@ -1428,7 +1428,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
|
||||
|
||||
/* n_name field */
|
||||
name = NULL;
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1449,7 +1449,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
|
||||
/* h_addrtype field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
if (strcmp(tmpbuf, "AF_INET") == 0)
|
||||
@ -1463,7 +1463,7 @@ irp_unmarshall_nw(struct nwent *ne, char *buffer) {
|
||||
/* n_net field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
nnet = 0;
|
||||
@ -1605,7 +1605,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
|
||||
|
||||
/* n_name field */
|
||||
name = NULL;
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0) {
|
||||
if (getfield(&name, 0, &p, fieldsep) == NULL || strlen(name) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1626,7 +1626,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
|
||||
/* h_addrtype field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
if (strcmp(tmpbuf, "AF_INET") == 0)
|
||||
@ -1640,7 +1640,7 @@ irp_unmarshall_ne(struct netent *ne, char *buffer) {
|
||||
/* n_net field */
|
||||
tb = tmpbuf;
|
||||
if (getfield(&tb, sizeof tmpbuf, &p, fieldsep) == NULL ||
|
||||
strlen(tb) == 0) {
|
||||
strlen(tb) == 0U) {
|
||||
goto error;
|
||||
}
|
||||
bits = inet_net_pton(naddrtype, tmpbuf, &nnet, sizeof nnet);
|
||||
@ -1961,12 +1961,12 @@ strcmp_nws(const char *a, const char *b) {
|
||||
static void
|
||||
free_array(char **argv, size_t entries) {
|
||||
char **p = argv;
|
||||
int useEntries = (entries > 0);
|
||||
int useEntries = (entries > 0U);
|
||||
|
||||
if (argv == NULL)
|
||||
return;
|
||||
|
||||
while ((useEntries && entries > 0) || *p) {
|
||||
while ((useEntries && entries > 0U) || *p) {
|
||||
if (*p)
|
||||
free(*p);
|
||||
p++;
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -44,10 +44,12 @@ static const char rcsid[] = "$Id$";
|
||||
|
||||
#include "irs_data.h"
|
||||
#undef _res
|
||||
#if !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||
#undef h_errno
|
||||
extern int h_errno;
|
||||
#endif
|
||||
|
||||
extern struct __res_state _res;
|
||||
extern int h_errno;
|
||||
|
||||
#ifdef DO_PTHREADS
|
||||
static pthread_key_t key;
|
||||
@ -119,12 +121,15 @@ net_data_destroy(void *p) {
|
||||
struct net_data *
|
||||
net_data_init(const char *conf_file) {
|
||||
#ifdef DO_PTHREADS
|
||||
#ifndef LIBBIND_MUTEX_INITIALIZER
|
||||
#define LIBBIND_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
|
||||
#endif
|
||||
static pthread_mutex_t keylock;
|
||||
struct net_data *net_data;
|
||||
|
||||
if (!once) {
|
||||
// OpenBeOS compatibility
|
||||
keylock = PTHREAD_MUTEX_INITIALIZER;
|
||||
/* XXX: Haiku has non-constant mutex initializer! Must init here. */
|
||||
keylock = LIBBIND_MUTEX_INITIALIZER;
|
||||
|
||||
pthread_mutex_lock(&keylock);
|
||||
if (!once++)
|
||||
@ -133,6 +138,7 @@ net_data_init(const char *conf_file) {
|
||||
}
|
||||
net_data = tls_get(key);
|
||||
#endif
|
||||
|
||||
if (net_data == NULL) {
|
||||
net_data = net_data_create(conf_file);
|
||||
if (net_data == NULL)
|
||||
@ -170,7 +176,7 @@ net_data_create(const char *conf_file) {
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
if ((net_data->res->options & RES_INIT) == 0 &&
|
||||
if ((net_data->res->options & RES_INIT) == 0U &&
|
||||
res_ninit(net_data->res) == -1) {
|
||||
(*net_data->irs->close)(net_data->irs);
|
||||
memput(net_data, sizeof (struct net_data));
|
||||
@ -180,8 +186,6 @@ net_data_create(const char *conf_file) {
|
||||
return (net_data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
net_data_minimize(struct net_data *net_data) {
|
||||
res_nclose(net_data->res);
|
||||
@ -197,6 +201,13 @@ __res_state(void) {
|
||||
|
||||
return (&_res);
|
||||
}
|
||||
#else
|
||||
#ifdef __linux
|
||||
struct __res_state *
|
||||
__res_state(void) {
|
||||
return (&_res);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int *
|
||||
@ -205,13 +216,22 @@ __h_errno(void) {
|
||||
struct net_data *net_data = net_data_init(NULL);
|
||||
if (net_data && net_data->res)
|
||||
return (&net_data->res->res_h_errno);
|
||||
#if !(__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||
return(&_res.res_h_errno);
|
||||
#else
|
||||
return (&h_errno);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
__h_errno_set(struct __res_state *res, int err) {
|
||||
|
||||
|
||||
#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)
|
||||
res->res_h_errno = err;
|
||||
#else
|
||||
h_errno = res->res_h_errno = err;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /*__BIND_NOSTATIC*/
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
@ -106,7 +106,7 @@ lcl_res_get(struct irs_acc *this) {
|
||||
lcl_res_set(this, res, free);
|
||||
}
|
||||
|
||||
if ((lcl->res->options & RES_INIT) == 0 &&
|
||||
if ((lcl->res->options & RES_INIT) == 0U &&
|
||||
res_ninit(lcl->res) < 0)
|
||||
return (NULL);
|
||||
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/* from gethostnamadr.c 8.1 (Berkeley) 6/4/93 */
|
||||
@ -569,7 +569,7 @@ init(struct irs_ho *this) {
|
||||
|
||||
if (!pvt->res && !ho_res_get(this))
|
||||
return (-1);
|
||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
res_ninit(pvt->res) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if !defined(LINT) && !defined(CODECENTER)
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -364,7 +364,7 @@ init(struct irs_nw *this) {
|
||||
|
||||
if (!pvt->res && !nw_res_get(this))
|
||||
return (-1);
|
||||
if (((pvt->res->options & RES_INIT) == 0) &&
|
||||
if (((pvt->res->options & RES_INIT) == 0U) &&
|
||||
res_ninit(pvt->res) == -1)
|
||||
return (-1);
|
||||
return (0);
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -32,20 +32,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
|
||||
* 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 INTERNET SOFTWARE CONSORTIUM DISCLAIMS
|
||||
* ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
|
||||
* CONSORTIUM 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.
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#if defined(LIBC_SCCS) && !defined(lint)
|
||||
@ -36,6 +36,9 @@ static const char rcsid[] = "$Id$";
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef T_NULL
|
||||
#undef T_NULL /* Silence re-definition warning of T_NULL. */
|
||||
#endif
|
||||
#include <arpa/nameser.h>
|
||||
#include <resolv.h>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user