mirror of
https://github.com/php/php-src.git
synced 2026-04-11 10:03:18 +02:00
Remove bindlib_w32
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
# ++Copyright++ 1993
|
||||
# -
|
||||
# Copyright (c)
|
||||
# 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.
|
||||
# -
|
||||
# Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
#
|
||||
# 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, and that
|
||||
# the name of Digital Equipment Corporation not be used in advertising or
|
||||
# publicity pertaining to distribution of the document or software without
|
||||
# specific, written prior permission.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
# WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
# CORPORATION 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.
|
||||
# -
|
||||
# --Copyright--
|
||||
|
||||
HFILES = inet.h nameser.h
|
||||
|
||||
DESTDIR =
|
||||
DESTINC = /usr/include
|
||||
|
||||
all depend:
|
||||
|
||||
clean:
|
||||
rm -f *~ *.BAK *.CKP *.orig
|
||||
|
||||
install: ${DESTDIR}${DESTINC}/arpa
|
||||
set -x; for x in ${HFILES}; do \
|
||||
${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/arpa/$$x; \
|
||||
done
|
||||
|
||||
${DESTDIR}${DESTINC}/arpa:
|
||||
mkdir $@
|
||||
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
* ++Copyright++ 1983, 1993
|
||||
* -
|
||||
* Copyright (c) 1983, 1993
|
||||
* 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.
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* 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, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION 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.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)inet.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _INET_H_
|
||||
#define _INET_H_
|
||||
|
||||
/* External definitions for functions in inet(3) */
|
||||
|
||||
#ifndef WINNT
|
||||
#include <sys/param.h>
|
||||
#if (!defined(BSD)) || (BSD < 199306)
|
||||
# include <sys/bitypes.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#else
|
||||
#define FD_SETSIZE 512
|
||||
#include <winsock.h>
|
||||
#endif /* WINNT */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifndef WINNT
|
||||
unsigned long inet_addr __P((const char *));
|
||||
#endif
|
||||
|
||||
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));
|
||||
#ifndef WINNT
|
||||
char *inet_ntoa __P((struct in_addr));
|
||||
#endif
|
||||
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
|
||||
|
||||
#endif /* !_INET_H_ */
|
||||
@@ -1,396 +0,0 @@
|
||||
/*
|
||||
* ++Copyright++ 1983, 1989, 1993
|
||||
* -
|
||||
* Copyright (c) 1983, 1989, 1993
|
||||
* 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.
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* 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, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION 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.
|
||||
* -
|
||||
* Portions Copyright (c) 1995 by International Business Machines, Inc.
|
||||
*
|
||||
* International Business Machines, Inc. (hereinafter called IBM) grants
|
||||
* permission under its copyrights to use, copy, modify, and distribute this
|
||||
* Software with or without fee, provided that the above copyright notice and
|
||||
* all paragraphs of this notice appear in all copies, and that the name of IBM
|
||||
* not be used in connection with the marketing of any product incorporating
|
||||
* the Software or modifications thereof, without specific, written prior
|
||||
* permission.
|
||||
*
|
||||
* To the extent it has a right to do so, IBM grants an immunity from suit
|
||||
* under its patents, if any, for the use, sale or manufacture of products to
|
||||
* the extent that such products are used for performing Domain Name System
|
||||
* dynamic updates in TCP/IP networks by means of the Software. No immunity is
|
||||
* granted for any product per se or for any other function of any product.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
|
||||
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
|
||||
* DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
|
||||
* IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
/*
|
||||
* @(#)nameser.h 8.1 (Berkeley) 6/2/93
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifndef _NAMESER_H_
|
||||
#define _NAMESER_H_
|
||||
|
||||
#ifndef WINNT
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#if (!defined(BSD)) || (BSD < 199306)
|
||||
# include <sys/bitypes.h>
|
||||
#else
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
#ifdef _AUX_SOURCE
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* 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 (__BIND > 19931104)". do not
|
||||
* compare for equality; rather, use it to determine whether your resolver
|
||||
* is new enough to contain a certain feature.
|
||||
*/
|
||||
|
||||
#define __BIND 19960801 /* interface version stamp */
|
||||
|
||||
/*
|
||||
* Define constants based on rfc883
|
||||
*/
|
||||
#define PACKETSZ 512 /* maximum packet size */
|
||||
#define MAXDNAME 1025 /* maximum presentation domain name */
|
||||
#define MAXCDNAME 255 /* maximum compressed domain name */
|
||||
#define MAXLABEL 63 /* maximum length of domain label */
|
||||
#define HFIXEDSZ 12 /* #/bytes of fixed data in header */
|
||||
#define QFIXEDSZ 4 /* #/bytes of fixed data in query */
|
||||
#define RRFIXEDSZ 10 /* #/bytes of fixed data in r record */
|
||||
#define INT32SZ 4 /* for systems without 32-bit ints */
|
||||
#define INT16SZ 2 /* for systems without 16-bit ints */
|
||||
#define INADDRSZ 4 /* IPv4 T_A */
|
||||
#define IN6ADDRSZ 16 /* IPv6 T_AAAA */
|
||||
|
||||
/*
|
||||
* Internet nameserver port number
|
||||
*/
|
||||
#define NAMESERVER_PORT 53
|
||||
|
||||
/*
|
||||
* Currently defined opcodes
|
||||
*/
|
||||
#define QUERY 0x0 /* standard query */
|
||||
#define IQUERY 0x1 /* inverse query */
|
||||
#define STATUS 0x2 /* nameserver status query */
|
||||
/*#define xxx 0x3*/ /* 0x3 reserved */
|
||||
#define NS_NOTIFY_OP 0x4 /* notify secondary of SOA change */
|
||||
/*
|
||||
* Currently defined response codes
|
||||
*/
|
||||
#if !(defined(WINNT) && defined(NOERROR))
|
||||
#define NOERROR 0 /* no error */
|
||||
#endif
|
||||
#define FORMERR 1 /* format error */
|
||||
#define SERVFAIL 2 /* server failure */
|
||||
#define NXDOMAIN 3 /* non existent domain */
|
||||
#define NOTIMP 4 /* not implemented */
|
||||
#define REFUSED 5 /* query refused */
|
||||
|
||||
/*
|
||||
* Type values for resources and queries
|
||||
*/
|
||||
#define T_A 1 /* host address */
|
||||
#define T_NS 2 /* authoritative server */
|
||||
#define T_MD 3 /* mail destination */
|
||||
#define T_MF 4 /* mail forwarder */
|
||||
#define T_CNAME 5 /* canonical name */
|
||||
#define T_SOA 6 /* start of authority zone */
|
||||
#define T_MB 7 /* mailbox domain name */
|
||||
#define T_MG 8 /* mail group member */
|
||||
#define T_MR 9 /* mail rename name */
|
||||
#define T_NULL 10 /* null resource record */
|
||||
#define T_WKS 11 /* well known service */
|
||||
#define T_PTR 12 /* domain name pointer */
|
||||
#define T_HINFO 13 /* host information */
|
||||
#define T_MINFO 14 /* mailbox information */
|
||||
#define T_MX 15 /* mail routing information */
|
||||
#define T_TXT 16 /* text strings */
|
||||
#define T_RP 17 /* responsible person */
|
||||
#define T_AFSDB 18 /* AFS cell database */
|
||||
#define T_X25 19 /* X_25 calling address */
|
||||
#define T_ISDN 20 /* ISDN calling address */
|
||||
#define T_RT 21 /* router */
|
||||
#define T_NSAP 22 /* NSAP address */
|
||||
#define T_NSAP_PTR 23 /* reverse NSAP lookup (deprecated) */
|
||||
#define T_SIG 24 /* security signature */
|
||||
#define T_KEY 25 /* security key */
|
||||
#define T_PX 26 /* X.400 mail mapping */
|
||||
#define T_GPOS 27 /* geographical position (withdrawn) */
|
||||
#define T_AAAA 28 /* IP6 Address */
|
||||
#define T_LOC 29 /* Location Information */
|
||||
#define T_NXT 30 /* Next Valid Name in Zone */
|
||||
#define T_EID 31 /* Endpoint identifier */
|
||||
#define T_NIMLOC 32 /* Nimrod locator */
|
||||
#define T_SRV 33 /* Server selection */
|
||||
#define T_ATMA 34 /* ATM Address */
|
||||
#define T_NAPTR 35 /* Naming Authority PoinTeR */
|
||||
/* non standard */
|
||||
#define T_UINFO 100 /* user (finger) information */
|
||||
#define T_UID 101 /* user ID */
|
||||
#define T_GID 102 /* group ID */
|
||||
#define T_UNSPEC 103 /* Unspecified format (binary data) */
|
||||
/* Query type values which do not appear in resource records */
|
||||
#define T_IXFR 251 /* incremental zone transfer */
|
||||
#define T_AXFR 252 /* transfer zone of authority */
|
||||
#define T_MAILB 253 /* transfer mailbox records */
|
||||
#define T_MAILA 254 /* transfer mail agent records */
|
||||
#define T_ANY 255 /* wildcard match */
|
||||
|
||||
/*
|
||||
* Values for class field
|
||||
*/
|
||||
|
||||
#define C_IN 1 /* the arpa internet */
|
||||
#define C_CHAOS 3 /* for chaos net (MIT) */
|
||||
#define C_HS 4 /* for Hesiod name server (MIT) (XXX) */
|
||||
/* Query class values which do not appear in resource records */
|
||||
#define C_ANY 255 /* wildcard match */
|
||||
|
||||
/*
|
||||
* Flags field of the KEY RR rdata
|
||||
*/
|
||||
#define KEYFLAG_TYPEMASK 0xC000 /* Mask for "type" bits */
|
||||
#define KEYFLAG_TYPE_AUTH_CONF 0x0000 /* Key usable for both */
|
||||
#define KEYFLAG_TYPE_CONF_ONLY 0x8000 /* Key usable for confidentiality */
|
||||
#define KEYFLAG_TYPE_AUTH_ONLY 0x4000 /* Key usable for authentication */
|
||||
#define KEYFLAG_TYPE_NO_KEY 0xC000 /* No key usable for either; no key */
|
||||
/* The type bits can also be interpreted independently, as single bits: */
|
||||
#define KEYFLAG_NO_AUTH 0x8000 /* Key not usable for authentication */
|
||||
#define KEYFLAG_NO_CONF 0x4000 /* Key not usable for confidentiality */
|
||||
|
||||
#define KEYFLAG_EXPERIMENTAL 0x2000 /* Security is *mandatory* if bit=0 */
|
||||
#define KEYFLAG_RESERVED3 0x1000 /* reserved - must be zero */
|
||||
#define KEYFLAG_RESERVED4 0x0800 /* reserved - must be zero */
|
||||
#define KEYFLAG_USERACCOUNT 0x0400 /* key is assoc. with a user acct */
|
||||
#define KEYFLAG_ENTITY 0x0200 /* key is assoc. with entity eg host */
|
||||
#define KEYFLAG_ZONEKEY 0x0100 /* key is zone key for the zone named */
|
||||
#define KEYFLAG_IPSEC 0x0080 /* key is for IPSEC use (host or user)*/
|
||||
#define KEYFLAG_EMAIL 0x0040 /* key is for email (MIME security) */
|
||||
#define KEYFLAG_RESERVED10 0x0020 /* reserved - must be zero */
|
||||
#define KEYFLAG_RESERVED11 0x0010 /* reserved - must be zero */
|
||||
#define KEYFLAG_SIGNATORYMASK 0x000F /* key can sign DNS RR's of same name */
|
||||
|
||||
#define KEYFLAG_RESERVED_BITMASK ( KEYFLAG_RESERVED3 | \
|
||||
KEYFLAG_RESERVED4 | \
|
||||
KEYFLAG_RESERVED10| KEYFLAG_RESERVED11)
|
||||
|
||||
/* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */
|
||||
#define ALGORITHM_MD5RSA 1 /* MD5 with RSA */
|
||||
#define ALGORITHM_EXPIRE_ONLY 253 /* No alg, no security */
|
||||
#define ALGORITHM_PRIVATE_OID 254 /* Key begins with OID indicating alg */
|
||||
|
||||
/* Signatures */
|
||||
/* Size of a mod or exp in bits */
|
||||
#define MIN_MD5RSA_KEY_PART_BITS 512
|
||||
#define MAX_MD5RSA_KEY_PART_BITS 2552
|
||||
/* Total of binary mod and exp, bytes */
|
||||
#define MAX_MD5RSA_KEY_BYTES ((MAX_MD5RSA_KEY_PART_BITS+7/8)*2+3)
|
||||
/* Max length of text sig block */
|
||||
#define MAX_KEY_BASE64 (((MAX_MD5RSA_KEY_BYTES+2)/3)*4)
|
||||
|
||||
/*
|
||||
* Status return codes for T_UNSPEC conversion routines
|
||||
*/
|
||||
#define CONV_SUCCESS 0
|
||||
#define CONV_OVERFLOW (-1)
|
||||
#define CONV_BADFMT (-2)
|
||||
#define CONV_BADCKSUM (-3)
|
||||
#define CONV_BADBUFLEN (-4)
|
||||
|
||||
#ifndef BYTE_ORDER
|
||||
#if (BSD >= 199103)
|
||||
# include <machine/endian.h>
|
||||
#else
|
||||
#ifdef linux
|
||||
# include <endian.h>
|
||||
#else
|
||||
#define LITTLE_ENDIAN 1234 /* least-significant byte first (vax, pc) */
|
||||
#define BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
|
||||
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp)*/
|
||||
|
||||
#if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \
|
||||
defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \
|
||||
defined(__alpha__) || defined(__alpha) || defined(WINNT)
|
||||
#define BYTE_ORDER LITTLE_ENDIAN
|
||||
#endif
|
||||
|
||||
#if defined(sel) || defined(pyr) || defined(mc68000) || defined(sparc) || \
|
||||
defined(is68k) || defined(tahoe) || defined(ibm032) || defined(ibm370) || \
|
||||
defined(MIPSEB) || defined(_MIPSEB) || defined(_IBMR2) || defined(DGUX) ||\
|
||||
defined(apollo) || defined(__convex__) || defined(_CRAY) || \
|
||||
defined(__hppa) || defined(__hp9000) || \
|
||||
defined(__hp9000s300) || defined(__hp9000s700) || \
|
||||
defined (BIT_ZERO_ON_LEFT) || defined(m68k)
|
||||
#define BYTE_ORDER BIG_ENDIAN
|
||||
#endif
|
||||
#endif /* linux */
|
||||
#endif /* BSD */
|
||||
#endif /* BYTE_ORDER */
|
||||
|
||||
#if !defined(BYTE_ORDER) || \
|
||||
(BYTE_ORDER != BIG_ENDIAN && BYTE_ORDER != LITTLE_ENDIAN && \
|
||||
BYTE_ORDER != PDP_ENDIAN)
|
||||
/* you must determine what the correct bit order is for
|
||||
* your compiler - the next line is an intentional error
|
||||
* which will force your compiles to bomb until you fix
|
||||
* the above macros.
|
||||
*/
|
||||
error "Undefined or invalid BYTE_ORDER";
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Structure for query header. The order of the fields is machine- and
|
||||
* compiler-dependent, depending on the byte/bit order and the layout
|
||||
* of bit fields. We use bit fields only in int variables, as this
|
||||
* is all ANSI requires. This requires a somewhat confusing rearrangement.
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
unsigned id :16; /* query identification number */
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
/* fields in third byte */
|
||||
unsigned qr: 1; /* response flag */
|
||||
unsigned opcode: 4; /* purpose of message */
|
||||
unsigned aa: 1; /* authoritive answer */
|
||||
unsigned tc: 1; /* truncated message */
|
||||
unsigned rd: 1; /* recursion desired */
|
||||
/* fields in fourth byte */
|
||||
unsigned ra: 1; /* recursion available */
|
||||
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
|
||||
unsigned ad: 1; /* authentic data from named */
|
||||
unsigned cd: 1; /* checking disabled by resolver */
|
||||
unsigned rcode :4; /* response code */
|
||||
#endif
|
||||
#if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN
|
||||
/* fields in third byte */
|
||||
unsigned rd :1; /* recursion desired */
|
||||
unsigned tc :1; /* truncated message */
|
||||
unsigned aa :1; /* authoritive answer */
|
||||
unsigned opcode :4; /* purpose of message */
|
||||
unsigned qr :1; /* response flag */
|
||||
/* fields in fourth byte */
|
||||
unsigned rcode :4; /* response code */
|
||||
unsigned cd: 1; /* checking disabled by resolver */
|
||||
unsigned ad: 1; /* authentic data from named */
|
||||
unsigned unused :1; /* unused bits (MBZ as of 4.9.3a3) */
|
||||
unsigned ra :1; /* recursion available */
|
||||
#endif
|
||||
/* remaining bytes */
|
||||
unsigned qdcount :16; /* number of question entries */
|
||||
unsigned ancount :16; /* number of answer entries */
|
||||
unsigned nscount :16; /* number of authority entries */
|
||||
unsigned arcount :16; /* number of resource entries */
|
||||
} HEADER;
|
||||
|
||||
/*
|
||||
* Defines for handling compressed domain names
|
||||
*/
|
||||
#define INDIR_MASK 0xc0
|
||||
|
||||
extern u_int16_t _getshort __P((const u_char *));
|
||||
extern u_int32_t _getlong __P((const u_char *));
|
||||
|
||||
/*
|
||||
* Inline versions of get/put short/long. Pointer is advanced.
|
||||
*
|
||||
* These macros demonstrate the property of C whereby it can be
|
||||
* portable or it can be elegant but rarely both.
|
||||
*/
|
||||
#define GETSHORT(s, cp) { \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
(s) = ((u_int16_t)t_cp[0] << 8) \
|
||||
| ((u_int16_t)t_cp[1]) \
|
||||
; \
|
||||
(cp) += INT16SZ; \
|
||||
}
|
||||
|
||||
#define GETLONG(l, cp) { \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
(l) = ((u_int32_t)t_cp[0] << 24) \
|
||||
| ((u_int32_t)t_cp[1] << 16) \
|
||||
| ((u_int32_t)t_cp[2] << 8) \
|
||||
| ((u_int32_t)t_cp[3]) \
|
||||
; \
|
||||
(cp) += INT32SZ; \
|
||||
}
|
||||
|
||||
#define PUTSHORT(s, cp) { \
|
||||
register u_int16_t t_s = (u_int16_t)(s); \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
*t_cp++ = (char) (t_s >> 8); \
|
||||
*t_cp = (char) t_s; \
|
||||
(cp) += INT16SZ; \
|
||||
}
|
||||
|
||||
#define PUTLONG(l, cp) { \
|
||||
register u_int32_t t_l = (u_int32_t)(l); \
|
||||
register u_char *t_cp = (u_char *)(cp); \
|
||||
*t_cp++ = t_l >> 24; \
|
||||
*t_cp++ = t_l >> 16; \
|
||||
*t_cp++ = t_l >> 8; \
|
||||
*t_cp = t_l; \
|
||||
(cp) += INT32SZ; \
|
||||
}
|
||||
|
||||
#endif /* !_NAMESER_H_ */
|
||||
@@ -1,251 +0,0 @@
|
||||
#! /bin/sh
|
||||
|
||||
## (From INN-1.4, written by Rich Salz)
|
||||
## $Revision: 1.1 $
|
||||
## A script to install files and directories.
|
||||
|
||||
PROGNAME=`basename $0`
|
||||
|
||||
## Paths to programs. CHOWN and WHOAMI are checked below.
|
||||
CHOWN=chown
|
||||
CHGRP=chgrp
|
||||
CHMOD=chmod
|
||||
CP=cp
|
||||
LN=ln
|
||||
MKDIR=mkdir
|
||||
MV=mv
|
||||
RM=rm
|
||||
STRIP=strip
|
||||
WHOAMI=whoami
|
||||
|
||||
## Some systems don't support -x, so we have to use -f.
|
||||
if [ ${CHOWN} = chown ] ; then
|
||||
if [ -f /etc/chown ] ; then
|
||||
CHOWN=/etc/chown
|
||||
else
|
||||
if [ -f /usr/etc/chown ] ; then
|
||||
CHOWN=/usr/etc/chown
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${WHOAMI} = whoami ] ; then
|
||||
if [ -f /usr/ucb/whoami ] ; then
|
||||
WHOAMI=/usr/ucb/whoami
|
||||
fi
|
||||
fi
|
||||
|
||||
## Defaults.
|
||||
CHOWNIT=false
|
||||
CHGROUPIT=false
|
||||
CHMODIT=false
|
||||
STRIPIT=false
|
||||
BACKIT=false
|
||||
TOUCHIT=true
|
||||
SAVESRC=false
|
||||
ROOT=unknown
|
||||
|
||||
## Process JCL.
|
||||
MORETODO=true
|
||||
while ${MORETODO} ; do
|
||||
case X"$1" in
|
||||
X-b)
|
||||
BACKIT=true
|
||||
BACKUP="$2"
|
||||
shift
|
||||
;;
|
||||
X-b*)
|
||||
BACKIT=true
|
||||
BACKUP=`expr "$1" : '-b\(.*\)'`
|
||||
;;
|
||||
X-c)
|
||||
SAVESRC=true
|
||||
;;
|
||||
X-g)
|
||||
GROUP="$2"
|
||||
CHGROUPIT=true
|
||||
shift
|
||||
;;
|
||||
X-g*)
|
||||
GROUP=`expr "$1" : '-g\(.*\)'`
|
||||
CHGROUPIT=true
|
||||
;;
|
||||
X-G)
|
||||
case ${ROOT} in
|
||||
unknown)
|
||||
case `${WHOAMI}` in
|
||||
root)
|
||||
ROOT=true
|
||||
;;
|
||||
*)
|
||||
ROOT=false
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
GROUP="$2"
|
||||
shift
|
||||
${ROOT} && CHGROUPIT=true
|
||||
;;
|
||||
X-G*)
|
||||
case ${ROOT} in
|
||||
unknown)
|
||||
case `${WHOAMI}` in
|
||||
root)
|
||||
ROOT=true
|
||||
;;
|
||||
*)
|
||||
ROOT=false
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
if ${ROOT} ; then
|
||||
GROUP=`expr "$1" : '-g\(.*\)'`
|
||||
CHGROUPIT=true
|
||||
fi
|
||||
;;
|
||||
X-m)
|
||||
MODE="$2"
|
||||
CHMODIT=true
|
||||
shift
|
||||
;;
|
||||
X-m*)
|
||||
MODE=`expr "$1" : '-m\(.*\)'`
|
||||
CHMODIT=true
|
||||
;;
|
||||
X-n)
|
||||
TOUCHIT=false
|
||||
;;
|
||||
X-o)
|
||||
OWNER="$2"
|
||||
CHOWNIT=true
|
||||
shift
|
||||
;;
|
||||
X-o*)
|
||||
OWNER=`expr "$1" : '-o\(.*\)'`
|
||||
CHOWNIT=true
|
||||
;;
|
||||
X-O)
|
||||
case ${ROOT} in
|
||||
unknown)
|
||||
case `${WHOAMI}` in
|
||||
root)
|
||||
ROOT=true
|
||||
;;
|
||||
*)
|
||||
ROOT=false
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
OWNER="$2"
|
||||
shift
|
||||
${ROOT} && CHOWNIT=true
|
||||
;;
|
||||
X-O*)
|
||||
case ${ROOT} in
|
||||
unknown)
|
||||
case `${WHOAMI}` in
|
||||
root)
|
||||
ROOT=true
|
||||
;;
|
||||
*)
|
||||
ROOT=false
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
if ${ROOT} ; then
|
||||
OWNER=`expr "$1" : '-o\(.*\)'`
|
||||
CHOWNIT=true
|
||||
fi
|
||||
;;
|
||||
X-s)
|
||||
STRIPIT=true
|
||||
;;
|
||||
X--)
|
||||
shift
|
||||
MORETODO=false
|
||||
;;
|
||||
X-*)
|
||||
echo "${PROGNAME}: Unknown flag $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
MORETODO=false
|
||||
;;
|
||||
esac
|
||||
${MORETODO} && shift
|
||||
done
|
||||
|
||||
## Process arguments.
|
||||
if [ $# -ne 2 ] ; then
|
||||
echo "Usage: ${PROGNAME} [flags] source destination"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
## Making a directory?
|
||||
if [ X"$1" = X. ] ; then
|
||||
DEST="$2"
|
||||
if [ ! -d "${DEST}" ] ; then
|
||||
${MKDIR} "${DEST}" || exit 1
|
||||
fi
|
||||
if ${CHOWNIT} ; then
|
||||
${CHOWN} "${OWNER}" "${DEST}" || exit 1
|
||||
fi
|
||||
if ${CHGROUPIT} ; then
|
||||
${CHGRP} "${GROUP}" "${DEST}" || exit 1
|
||||
fi
|
||||
if ${CHMODIT} ; then
|
||||
umask 0
|
||||
${CHMOD} "${MODE}" "${DEST}" || exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
## Get the destination and a temp file in the destination diretory.
|
||||
if [ -d "$2" ] ; then
|
||||
DEST="$2/$1"
|
||||
TEMP="$2/$$.tmp"
|
||||
else
|
||||
DEST="$2"
|
||||
TEMP="`expr "$2" : '\(.*\)/.*'`/$$.tmp"
|
||||
fi
|
||||
|
||||
## If not given the same name, we must try to copy.
|
||||
if [ X"$1" != X"$2" -o $SAVESRC ] ; then
|
||||
if cmp -s "$1" "${DEST}" ; then
|
||||
## Files are same; touch or not.
|
||||
${TOUCHIT} && touch "${DEST}"
|
||||
else
|
||||
## If destination exists and we wish to backup, link to backup.
|
||||
if [ -f "${DEST}" ] ; then
|
||||
if ${BACKIT} ; then
|
||||
${RM} -f "${DEST}${BACKUP}"
|
||||
${LN} "${DEST}" "${DEST}${BACKUP}"
|
||||
fi
|
||||
fi
|
||||
## Copy source to the right dir, then move to right spot.
|
||||
## Done in two parts so we can hope for atomicity.
|
||||
${RM} -f "${TEMP}" || exit 1
|
||||
${CP} "$1" "${TEMP}" || exit 1
|
||||
${MV} -f "${TEMP}" "${DEST}" || exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
## Strip and set the modes.
|
||||
if ${STRIPIT} ; then
|
||||
${STRIP} "${DEST}" || exit 1
|
||||
fi
|
||||
if ${CHOWNIT} ; then
|
||||
${CHOWN} "${OWNER}" "${DEST}" || exit 1
|
||||
fi
|
||||
if ${CHGROUPIT} ; then
|
||||
${CHGRP} "${GROUP}" "${DEST}" || exit 1
|
||||
fi
|
||||
if ${CHMODIT} ; then
|
||||
umask 0
|
||||
${CHMOD} "${MODE}" "${DEST}" || exit 1
|
||||
fi
|
||||
exit 0
|
||||
@@ -1,50 +0,0 @@
|
||||
-
|
||||
Copyright (c) XYZZY
|
||||
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.
|
||||
-
|
||||
Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
|
||||
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, and that
|
||||
the name of Digital Equipment Corporation not be used in advertising or
|
||||
publicity pertaining to distribution of the document or software without
|
||||
specific, written prior permission.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
CORPORATION 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,45 +0,0 @@
|
||||
|
||||
How to add new hosts to the name server data base:
|
||||
|
||||
1) Edit 'named.hosts' file:
|
||||
|
||||
For each machine you need to enter the following information:
|
||||
machine name, all its network addresses, host information, and common
|
||||
aliases for it.
|
||||
|
||||
This is the entry for calder.
|
||||
|
||||
CALDER IN A 128.32.130.1
|
||||
IN A 128.32.129.3
|
||||
IN HINFO VAX-11/750 UNIX
|
||||
UCBCALDER IN CNAME CALDER
|
||||
|
||||
For the machine you are adding:
|
||||
1) replace 'CALDER' with the new machine name
|
||||
2) replace '128.32.130.1' with the new machines address
|
||||
if there is more then one address for the machine
|
||||
then add lines like the one with '128.32.129.3'
|
||||
3) replace 'VAX-11/750' with the machine type
|
||||
4) If it doesn't run 'UNIX' then replace UNIX with its
|
||||
operating system.
|
||||
|
||||
2) Edit 'named.rev' file:
|
||||
|
||||
For each address of a machine you need to enter the reverse
|
||||
address notation for the machine:
|
||||
|
||||
For calder the lines look as follows:
|
||||
|
||||
12.0 IN PTR CALDER.BERKELEY.EDU.
|
||||
3.129 IN PTR CALDER.BERKELEY.EDU.
|
||||
|
||||
Calder has two address '128.32.0.12' and '128.32.129.3'
|
||||
|
||||
You take the two numbers after 128.32 and reverse them.
|
||||
Then replace CALDER with the new machine name.
|
||||
|
||||
*** Note the trailing "." on "EDU." it needs to be there. Otherwise
|
||||
BIND will add the current $ORIGIN to this name, which won't work.
|
||||
***
|
||||
|
||||
3) Increment the serial number on both files.
|
||||
@@ -1,18 +0,0 @@
|
||||
;
|
||||
; @(#)named.boot.slave 1.13 (Berkeley) 87/07/21
|
||||
;
|
||||
; boot file for secondary name server
|
||||
; Note that there should be one primary entry for each SOA record.
|
||||
;
|
||||
;
|
||||
sortlist 10.0.0.0
|
||||
|
||||
directory /usr/local/adm/named
|
||||
|
||||
; type domain source host/file backup file
|
||||
|
||||
cache . root.cache
|
||||
secondary Berkeley.EDU 128.32.137.8 128.32.137.3 ucbhosts.bak
|
||||
secondary 32.128.IN-ADDR.ARPA 128.32.137.8 128.32.137.3 ucbhosts.rev.bak
|
||||
primary 0.0.127.IN-ADDR.ARPA localhost.rev
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
;
|
||||
; @(#)named.boot.slave 1.13 (Berkeley) 87/07/21
|
||||
;
|
||||
; boot file for secondary name server
|
||||
; Note that there should be one primary entry for each SOA record.
|
||||
;
|
||||
;
|
||||
sortlist 10.0.0.0
|
||||
|
||||
directory /usr/local/adm/named
|
||||
|
||||
; type domain source host/file backup file
|
||||
|
||||
cache . root.cache
|
||||
secondary Berkeley.EDU 128.32.137.8 128.32.137.3 ucbhosts.bak
|
||||
secondary 32.128.IN-ADDR.ARPA 128.32.137.8 128.32.137.3 ucbhosts.rev.bak
|
||||
primary 0.0.127.IN-ADDR.ARPA localhost.rev
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
;
|
||||
; boot file for authoritive master name server for Berkeley.EDU
|
||||
; Note that there should be one primary entry for each SOA record.
|
||||
;
|
||||
;
|
||||
sortlist 10.0.0.0
|
||||
|
||||
directory /usr/local/adm/named
|
||||
|
||||
; type domain source host/file backup file
|
||||
|
||||
cache . root.cache
|
||||
primary Berkeley.EDU berkeley.zone
|
||||
primary 32.128.IN-ADDR.ARPA berkeley.rev
|
||||
primary 0.0.127.IN-ADDR.ARPA localhost.rev
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
; Authoritative data for Berkeley.EDU (ORIGIN assumed Berkeley.EDU)
|
||||
;
|
||||
@ IN SOA ucbvax.berkeley.edu kjd.ucbvax.berkeley.edu (
|
||||
1986020501 ; Serial
|
||||
10800 ; Refresh 3 hours
|
||||
3600 ; Retry 1 hour
|
||||
3600000 ; Expire 1000 hours
|
||||
86400 ) ; Minimum 24 hours
|
||||
IN MX 10 ucb-vax
|
||||
IN NS monet
|
||||
localhost IN A 127.1
|
||||
ucb-arpa IN A 10.0.0.78
|
||||
IN A 128.32.0.4
|
||||
IN HINFO VAX-11/780 UNIX
|
||||
arpa IN CNAME ucbarpa
|
||||
ucb-vax 9999 IN A 10.2.0.78
|
||||
IN A 128.32.0.10
|
||||
IN HINFO VAX-11/750 UNIX
|
||||
ucbvax IN CNAME ucb-vax
|
||||
monet IN A 128.32.0.7
|
||||
IN HINFO VAX-11/750 UNIX
|
||||
ucbmonet IN CNAME monet
|
||||
@@ -1,22 +0,0 @@
|
||||
; Authoritative data for Berkeley.EDU (ORIGIN assumed Berkeley.EDU)
|
||||
;
|
||||
@ IN SOA ucbvax.berkeley.edu kjd.ucbvax.berkeley.edu (
|
||||
1986020501 ; Serial
|
||||
10800 ; Refresh 3 hours
|
||||
3600 ; Retry 1 hour
|
||||
3600000 ; Expire 1000 hours
|
||||
86400 ) ; Minimum 24 hours
|
||||
IN MX 10 ucb-vax
|
||||
IN NS monet
|
||||
localhost IN A 127.1
|
||||
ucb-arpa IN A 10.0.0.78
|
||||
IN A 128.32.0.4
|
||||
IN HINFO VAX-11/780 UNIX
|
||||
arpa IN CNAME ucbarpa
|
||||
ucb-vax 9999 IN A 10.2.0.78
|
||||
IN A 128.32.0.10
|
||||
IN HINFO VAX-11/750 UNIX
|
||||
ucbvax IN CNAME ucb-vax
|
||||
monet IN A 128.32.0.7
|
||||
IN HINFO VAX-11/750 UNIX
|
||||
ucbmonet IN CNAME monet
|
||||
@@ -1,13 +0,0 @@
|
||||
;
|
||||
; @(#)named.local 1.1 (Berkeley) 86/01/21
|
||||
;
|
||||
|
||||
@ IN SOA ucbvax.Berkeley.EDU. kjd.ucbvax.Berkeley.EDU. (
|
||||
1986012101 ; Serial
|
||||
3600 ; Refresh
|
||||
300 ; Retry
|
||||
3600000 ; Expire
|
||||
14400 ) ; Minimum
|
||||
IN NS ucbvax.Berkeley.EDU.
|
||||
0 IN PTR loopback.ucbvax.Berkeley.EDU.
|
||||
1 IN PTR localhost.
|
||||
@@ -1,13 +0,0 @@
|
||||
;
|
||||
; @(#)named.local 1.1 (Berkeley) 86/01/21
|
||||
;
|
||||
|
||||
@ IN SOA ucbvax.Berkeley.EDU. kjd.ucbvax.Berkeley.EDU. (
|
||||
1986012101 ; Serial
|
||||
3600 ; Refresh
|
||||
300 ; Retry
|
||||
3600000 ; Expire
|
||||
14400 ) ; Minimum
|
||||
IN NS ucbvax.Berkeley.EDU.
|
||||
0 IN PTR loopback.ucbvax.Berkeley.EDU.
|
||||
1 IN PTR localhost.
|
||||
@@ -1,30 +0,0 @@
|
||||
;
|
||||
; @(#)named.rev 1.1 (Berkeley) 86/02/05
|
||||
;
|
||||
|
||||
@ IN SOA ucbvax.berkeley.edu kjd.ucbvax.berkeley.edu (
|
||||
1986020501 ; Serial
|
||||
10800 ; Refresh 3 hours
|
||||
3600 ; Retry 1 hour
|
||||
3600000 ; Expire 1000 hours
|
||||
86400 ) ; Minimum 24 hours
|
||||
IN NS ucbvax.Berkeley.EDU.
|
||||
; RFC 1101 stuff
|
||||
0.0 IN PTR Berkeley-net.Berkeley.EDU.
|
||||
IN A 255.255.255.0
|
||||
; real hosts
|
||||
0.130 IN PTR csdiv-net.Berkeley.EDU.
|
||||
2.129 IN PTR monet.Berkeley.EDU.
|
||||
2.140 IN PTR ucbarpa.Berkeley.EDU.
|
||||
3.132 IN PTR cad.Berkeley.EDU.
|
||||
4.0 IN PTR ucbarpa.Berkeley.EDU.
|
||||
5.0 IN PTR cad.Berkeley.EDU.
|
||||
6.0 IN PTR ernie.Berkeley.EDU.
|
||||
6.130 IN PTR monet-cs.Berkeley.EDU.
|
||||
7.0 IN PTR monet.Berkeley.EDU.
|
||||
7.130 IN PTR kim.Berkeley.EDU.
|
||||
9.0 IN PTR esvax.Berkeley.EDU.
|
||||
10.0 IN PTR ucbvax.Berkeley.EDU.
|
||||
11.0 IN PTR kim.Berkeley.EDU.
|
||||
11.156 IN PTR esvax-156.Berkeley.EDU.
|
||||
38.131 IN PTR monet.Berkeley.EDU.
|
||||
@@ -1,16 +0,0 @@
|
||||
;
|
||||
; boot file for authoritive master name server for Berkeley.EDU
|
||||
; Note that there should be one primary entry for each SOA record.
|
||||
;
|
||||
;
|
||||
sortlist 10.0.0.0
|
||||
|
||||
directory /usr/local/adm/named
|
||||
|
||||
; type domain source host/file backup file
|
||||
|
||||
cache . root.cache
|
||||
primary Berkeley.EDU berkeley.zone
|
||||
primary 32.128.IN-ADDR.ARPA berkeley.rev
|
||||
primary 0.0.127.IN-ADDR.ARPA localhost.rev
|
||||
|
||||
@@ -1,63 +0,0 @@
|
||||
; This file holds the information on root name servers needed to
|
||||
; initialize cache of Internet domain name servers
|
||||
; (e.g. reference this file in the "cache . <file>"
|
||||
; configuration file of BIND domain name servers).
|
||||
;
|
||||
; This file is made available by InterNIC registration services
|
||||
; under anonymous FTP as
|
||||
; file /domain/named.root
|
||||
; on server FTP.RS.INTERNIC.NET
|
||||
; -OR- under Gopher at RS.INTERNIC.NET
|
||||
; under menu InterNIC Registration Services (NSI)
|
||||
; submenu InterNIC Registration Archives
|
||||
; file named.root
|
||||
;
|
||||
; last update: Nov 8, 1995
|
||||
; related version of root zone: 1995110800
|
||||
;
|
||||
;
|
||||
; formerly NS.INTERNIC.NET
|
||||
;
|
||||
. 3600000 IN NS A.ROOT-SERVERS.NET.
|
||||
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
|
||||
;
|
||||
; formerly NS1.ISI.EDU
|
||||
;
|
||||
. 3600000 NS B.ROOT-SERVERS.NET.
|
||||
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
|
||||
;
|
||||
; formerly C.PSI.NET
|
||||
;
|
||||
. 3600000 NS C.ROOT-SERVERS.NET.
|
||||
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
|
||||
;
|
||||
; formerly TERP.UMD.EDU
|
||||
;
|
||||
. 3600000 NS D.ROOT-SERVERS.NET.
|
||||
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
|
||||
;
|
||||
; formerly NS.NASA.GOV
|
||||
;
|
||||
. 3600000 NS E.ROOT-SERVERS.NET.
|
||||
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
|
||||
;
|
||||
; formerly NS.ISC.ORG
|
||||
;
|
||||
. 3600000 NS F.ROOT-SERVERS.NET.
|
||||
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
|
||||
;
|
||||
; formerly NS.NIC.DDN.MIL
|
||||
;
|
||||
. 3600000 NS G.ROOT-SERVERS.NET.
|
||||
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
|
||||
;
|
||||
; formerly AOS.ARL.ARMY.MIL
|
||||
;
|
||||
. 3600000 NS H.ROOT-SERVERS.NET.
|
||||
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
|
||||
;
|
||||
; formerly NIC.NORDU.NET
|
||||
;
|
||||
. 3600000 NS I.ROOT-SERVERS.NET.
|
||||
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
|
||||
; End of File
|
||||
@@ -1,63 +0,0 @@
|
||||
; This file holds the information on root name servers needed to
|
||||
; initialize cache of Internet domain name servers
|
||||
; (e.g. reference this file in the "cache . <file>"
|
||||
; configuration file of BIND domain name servers).
|
||||
;
|
||||
; This file is made available by InterNIC registration services
|
||||
; under anonymous FTP as
|
||||
; file /domain/named.root
|
||||
; on server FTP.RS.INTERNIC.NET
|
||||
; -OR- under Gopher at RS.INTERNIC.NET
|
||||
; under menu InterNIC Registration Services (NSI)
|
||||
; submenu InterNIC Registration Archives
|
||||
; file named.root
|
||||
;
|
||||
; last update: Nov 8, 1995
|
||||
; related version of root zone: 1995110800
|
||||
;
|
||||
;
|
||||
; formerly NS.INTERNIC.NET
|
||||
;
|
||||
. 3600000 IN NS A.ROOT-SERVERS.NET.
|
||||
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
|
||||
;
|
||||
; formerly NS1.ISI.EDU
|
||||
;
|
||||
. 3600000 NS B.ROOT-SERVERS.NET.
|
||||
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
|
||||
;
|
||||
; formerly C.PSI.NET
|
||||
;
|
||||
. 3600000 NS C.ROOT-SERVERS.NET.
|
||||
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
|
||||
;
|
||||
; formerly TERP.UMD.EDU
|
||||
;
|
||||
. 3600000 NS D.ROOT-SERVERS.NET.
|
||||
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
|
||||
;
|
||||
; formerly NS.NASA.GOV
|
||||
;
|
||||
. 3600000 NS E.ROOT-SERVERS.NET.
|
||||
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
|
||||
;
|
||||
; formerly NS.ISC.ORG
|
||||
;
|
||||
. 3600000 NS F.ROOT-SERVERS.NET.
|
||||
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
|
||||
;
|
||||
; formerly NS.NIC.DDN.MIL
|
||||
;
|
||||
. 3600000 NS G.ROOT-SERVERS.NET.
|
||||
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
|
||||
;
|
||||
; formerly AOS.ARL.ARMY.MIL
|
||||
;
|
||||
. 3600000 NS H.ROOT-SERVERS.NET.
|
||||
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
|
||||
;
|
||||
; formerly NIC.NORDU.NET
|
||||
;
|
||||
. 3600000 NS I.ROOT-SERVERS.NET.
|
||||
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
|
||||
; End of File
|
||||
@@ -1,160 +0,0 @@
|
||||
/* options.h - specify the conditionally-compiled features
|
||||
* vix 28mar92 [moved out of the Makefile because they were getting too big]
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* ++Copyright++
|
||||
* -
|
||||
* Copyright (c)
|
||||
* 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.
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* 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, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION 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.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
/* Key:
|
||||
* ucb = U C Berkeley 4.8.3 release
|
||||
* vix = Paul Vixie of Digital
|
||||
* del = Don Lewis of Harris
|
||||
* mcsun = Piet Beertema of EUNet
|
||||
* asp = Andrew Partan of UUNet
|
||||
* pma = Paul Albitz of Hewlett Packard
|
||||
* bb = Bryan Beecher of UMich
|
||||
* mpa = Mark Andrews of CSIRO - DMS
|
||||
* rossc = Ross Cartlidge of The Univeritsy of Sydney
|
||||
* mtr = Marshall Rose of TPC.INT
|
||||
* bg = Benoit Grange of INRIA
|
||||
* ckd = Christopher Davis of Kapor Enterprises
|
||||
* gns = Greg Shapiro of WPI
|
||||
*/
|
||||
|
||||
#define DEBUG /* enable -d flag and SIGUSR[12] support (ucb) */
|
||||
/*#define ALLOW_T_UNSPEC /* enable the "unspec" RR type for old athena (ucb) */
|
||||
/*#define INVQ /* enable inverse queries (nslookup) (ucb/vix) */
|
||||
/*#define DSTORAGE /* debug malloc overruns using storage.o (ucb/vix) */
|
||||
/*#define DMALLOC /* trace malloc orphans using dmalloc.o (vix) */
|
||||
#define XFRNETS /* enable "xfrnets" command in named.boot (vix) */
|
||||
#define PID_FIX /* be careful about overwriting named.pid file (del) */
|
||||
#define FWD_LOOP /* try to break out of forwarding loops (del) */
|
||||
#define NO_GLUE /* don't accept or send out-of-zone glue (del) */
|
||||
#define BOGUSNS /* detect bogus nameservers (mcsun) */
|
||||
#define QRYLOG /* enable SIGWINCH for query logging (bb) */
|
||||
/*#define YPKLUDGE /* deal effectively with broken "ypserv -i" (mcsun) */
|
||||
#define TRACEROOT /* trace bogus root servers and ignore them (pma,bb) */
|
||||
/*#define LOCALDOM /* permit "domain" directive in named.boot (ucb) */
|
||||
#define FORCED_RELOAD /* refresh secondary zones on SIGHUP (pma) */
|
||||
#define SLAVE_FORWARD /* use sensible timeouts on slave forwarders (pma) */
|
||||
#define WANT_PIDFILE /* if you want the named.pid file (ucb/arc) */
|
||||
#define DOTTED_SERIAL /* if you want to be able to specify dotted serial#s */
|
||||
#define SENSIBLE_DOTS /* if you want dotted serial#s to make numeric sense */
|
||||
#define NCACHE /* negative caching (anant@isi.edu) */
|
||||
/*#define VALIDATE /* validation procedure (anant@isi.edu) (BUGGY!) */
|
||||
/*#define SHORT_FNAMES /* file names used in named-xfer need to be short */
|
||||
#define RESOLVSORT /* allow sorting of addresses in gethostbyname (mpa) */
|
||||
#define STUBS /* allow transfers of NS only for a zone (mpa) */
|
||||
#ifndef LOGFAC
|
||||
#define LOGFAC LOG_DAEMON /* what syslog facility should named use? */
|
||||
#endif
|
||||
#define SECURE_ZONES /* if you want to inhibit world access to zones (gns)*/
|
||||
#define ROUND_ROBIN /* rotate databuf list after each access (mtr) */
|
||||
#define ADDAUTH /* return NS and glue w/ authorative answers (mpa) */
|
||||
#define RFC1535 /* use RFC 1535 default for "search" list (vix) */
|
||||
#define GEN_AXFR /* distinct zones within each class */
|
||||
#define LAME_DELEGATION /* lame delegations (original-del,reworked-bb&del)*/
|
||||
#define LAME_LOGGING LOG_DEBUG /* log lame delegations, set log level */
|
||||
#define GETSER_LOGGING LOG_INFO /* log errors/timeouts getting serial number */
|
||||
#define RETURNSOA /* good code that the world might be ready for now */
|
||||
#define CLEANCACHE /* useful and necessary in the face of NCACHE */
|
||||
#define PURGE_ZONE /* remove all traces of a zone when reloading (mpa) */
|
||||
#define STATS /* keep nameserver statistics; uses more memory */
|
||||
#ifndef WINNT
|
||||
#define RENICE /* named-xfer should run at normal priority */
|
||||
#endif
|
||||
#define XSTATS /* extended statistics, syslogged periodically (bg) */
|
||||
/*#define BIND_NOTIFY /* experimental - do not enable in customer products */
|
||||
#define LOC_RR /* support for LOC record parsing (ckd/vix) */
|
||||
#define SORT_RESPONSE /* should we try to sort responses optimally? (vix) */
|
||||
|
||||
/*--------------------------------------------*
|
||||
* no user-servicable parts beyond this point *
|
||||
*--------------------------------------------*/
|
||||
|
||||
/* if DSTORAGE is defined, we need to disable DMALLOC and remap
|
||||
* malloc and free to storage.o's exported names. storage.o also
|
||||
* includes a calloc and a realloc, but once we drag in its malloc
|
||||
* and free we'll get the others automatically and so will never
|
||||
* pull in those routines from libc.a.
|
||||
*/
|
||||
#ifdef DSTORAGE
|
||||
# ifdef DMALLOC
|
||||
# undef DMALLOC
|
||||
# endif /*DMALLOC*/
|
||||
# define malloc rt_malloc
|
||||
# define free rt_free
|
||||
#endif /*DSTORAGE*/
|
||||
|
||||
/* if DMALLOC is defined, grab the header file which will remap
|
||||
* all the malloc-style names to those exported by dmalloc.o. note
|
||||
* that DMALLOC also changes the function signatures of several
|
||||
* functions in private named source modules, and that this file
|
||||
* (options.h) must be included before any other private *.h files
|
||||
* since those *.h files have some conditional remapping to do.
|
||||
*/
|
||||
#ifdef DMALLOC
|
||||
# include "dmalloc.h"
|
||||
#endif
|
||||
|
||||
#ifdef LAME_LOGGING
|
||||
# define LAME_DELEGATION
|
||||
#endif
|
||||
|
||||
#if defined(XSTATS) && !defined(STATS)
|
||||
# define STATS
|
||||
#endif
|
||||
@@ -1,763 +0,0 @@
|
||||
/* portability.h - include or define things that aren't present on all systems
|
||||
* vixie@decwrl 26dec92 [new]
|
||||
*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c)
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* 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, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef __BIND_PORTABILITY_H
|
||||
#define __BIND_PORTABILITY_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#ifndef WINNT
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <string.h>
|
||||
#include <signal.h>
|
||||
#ifndef WINNT
|
||||
#ifndef TIME_H_INCLUDED
|
||||
# include <sys/time.h>
|
||||
# define TIME_H_INCLUDED
|
||||
#endif
|
||||
#endif /* WINNT */
|
||||
|
||||
#ifdef WINNT
|
||||
#ifndef _PORTABILITY_H
|
||||
#define _PORTABILITY_H
|
||||
#include <stdio.h>
|
||||
#ifdef BUFSIZ
|
||||
#undef BUFSIZ
|
||||
#endif
|
||||
#define BUFSIZ 1024 /* GMS - added since Unix used 1K and NT 512B */
|
||||
#include <string.h>
|
||||
#include <process.h>
|
||||
#include <sys/timeb.h>
|
||||
#include <time.h>
|
||||
#include <io.h>
|
||||
#include <stdlib.h>
|
||||
#define FD_SETSIZE 512
|
||||
#include <winsock.h>
|
||||
#include <windows.h>
|
||||
#include <limits.h>
|
||||
|
||||
#define NOWAIT
|
||||
#define HAVE_SETVBUF
|
||||
#define NEED_GETTIMEOFDAY
|
||||
#define USE_MEMCPY
|
||||
#undef IP_OPTIONS
|
||||
#define PATH_MAX MAX_PATH
|
||||
#define ETIMEDOUT WSAETIMEDOUT
|
||||
#define ECONNRESET WSAECONNRESET
|
||||
#define ECONNREFUSED WSAECONNREFUSED
|
||||
#define EADDRINUSE WSAEADDRINUSE
|
||||
#define PORT_WOULDBLK WSAEWOULDBLOCK
|
||||
#define _TIMEZONE timezoneBSD
|
||||
|
||||
struct timezoneBSD {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
struct iovec {
|
||||
char * iov_base;
|
||||
int iov_len;
|
||||
};
|
||||
typedef char * caddr_t;
|
||||
typedef long pid_t;
|
||||
#define sleep(t) Sleep(t*1000)
|
||||
/* (Removed by Zeev - the DLL version of the C runtime conflicts with this
|
||||
* #ifdef errno
|
||||
* #undef errno
|
||||
* #endif
|
||||
* #define errno WSAGetLastError()
|
||||
*/
|
||||
/* #define close(s) closesocket(s) */
|
||||
#define chdir(path) SetCurrentDirectory(path)
|
||||
#define dup2(s1, s2) DuplicateHandle(GetCurrentProcess(), (HANDLE)(s1), \
|
||||
GetCurrentProcess(), (LPHANDLE)&(s2), \
|
||||
0, FALSE, DUPLICATE_SAME_ACCESS);
|
||||
#define strcasecmp(x, y) stricmp(x, y)
|
||||
#define strncasecmp(x, y, z) strnicmp(x, y, z)
|
||||
|
||||
void service_main(DWORD, LPTSTR *);
|
||||
void service_ctrl(DWORD);
|
||||
void worker_thread(void *);
|
||||
void dispatch_thread(void *);
|
||||
void syslog(int, char *, ...);
|
||||
void expand_paths(void);
|
||||
int writev(int, struct iovec *, int);
|
||||
int mkstemp(char *);
|
||||
|
||||
#define MAXALIASES 35
|
||||
#define LOG_EMERG 0 /* system is unusable */
|
||||
#define LOG_ALERT 1 /* action must be taken immediately */
|
||||
#define LOG_CRIT 2 /* critical conditions */
|
||||
#define LOG_ERR 3 /* error conditions */
|
||||
#define LOG_WARNING 4 /* warning conditions */
|
||||
#define LOG_NOTICE 5 /* normal but signification condition */
|
||||
#define LOG_INFO 6 /* informational */
|
||||
#define LOG_DEBUG 7 /* debug-level messages */
|
||||
/* control codes that the service will accept */
|
||||
#define SERVICE_CONTROL_DUMPDB 128
|
||||
#define SERVICE_CONTROL_RELOAD 129
|
||||
#define SERVICE_CONTROL_STATS 130
|
||||
#define SERVICE_CONTROL_TRACE 131
|
||||
#define SERVICE_CONTROL_NOTRACE 132
|
||||
#define SERVICE_CONTROL_QRYLOG 133
|
||||
#define SERVICE_CONTROL_CHKPT 134
|
||||
#define SERVICE_CONTROL_EXIT 135
|
||||
#define SERVICE_CONTROL_NOLOG 136
|
||||
#define SERVICE_CONTROL_LOG 137
|
||||
#endif /* _PORTABILITY_H */
|
||||
#endif /* WINNT */
|
||||
|
||||
/* (ISC = INTERACTIVE Systems Corporation in the next #ifdef, btw.) */
|
||||
#ifdef ISC
|
||||
# ifndef _POSIX_SOURCE
|
||||
# define _POSIX_SOURCE
|
||||
# endif
|
||||
# define SYSV
|
||||
# define SVR3
|
||||
# define _SYSV3
|
||||
# define NEED_STRTOUL
|
||||
# define NEED_FTRUNCATE
|
||||
# define USE_POSIX
|
||||
# include <sys/bsdtypes.h>
|
||||
# include <sys/sioctl.h>
|
||||
# include <sys/stream.h>
|
||||
# include <net/errno.h>
|
||||
#endif
|
||||
|
||||
#if defined(__convex__)
|
||||
# if !defined(_POSIX_SOURCE)
|
||||
# define _POSIX_SOURCE
|
||||
# endif
|
||||
# define USE_UTIME
|
||||
# define NEED_PUTENV
|
||||
#endif
|
||||
|
||||
#if defined(_CRAY)
|
||||
# if !defined(_POSIX_SOURCE)
|
||||
# define _POSIX_SOURCE
|
||||
# endif
|
||||
# define writev(a,b,c) __writev(a,b,c)
|
||||
# define setitimer(a,b,c) __setitimer(a,b,c)
|
||||
#endif
|
||||
|
||||
/* This is for AIX 4.1.x */
|
||||
#ifdef _AIX41
|
||||
# include <sys/select.h>
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
# define vfork fork
|
||||
#endif
|
||||
|
||||
/* This is defined in the Makefile for INTERACTIVE compiles. */
|
||||
#if defined(ISC)
|
||||
# define ftruncate(a,b) __ftruncate(a,b)
|
||||
# define USE_MEMCPY
|
||||
# define USE_UTIME
|
||||
# define HAVE_FCHMOD 0
|
||||
#endif
|
||||
|
||||
/* SCO UNIX defines only this unique symbol, apparently. */
|
||||
#if defined(M_UNIX)
|
||||
# define POSIX_SIGNALS
|
||||
# if !defined(_SCO_DS)
|
||||
/* This section is for 3.2v4.2/ODT3.0 and maybe also for 3.2v4.1/3.2v4.0 */
|
||||
/* XXX - why is this POSIX_SOURCE instead of _POSIX_SOURCE? */
|
||||
# undef POSIX_SOURCE
|
||||
# define HAVE_FCHMOD 0
|
||||
# define NEED_WRITEV
|
||||
# define writev(a,b,c) __writev(a,b,c)
|
||||
# define ftruncate(a,b) __ftruncate(a,b)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef NeXT
|
||||
# define NEED_PUTENV
|
||||
# define NEED_SETENV
|
||||
# define HAVE_STDLIB_H
|
||||
# define NEED_STRDUP
|
||||
# define inet_addr(a) __inet_addr(a)
|
||||
#endif
|
||||
|
||||
#if defined(__sgi)
|
||||
# define BSD 43
|
||||
# define vfork fork
|
||||
#endif
|
||||
|
||||
#if defined(SUNOS4)
|
||||
# define BSD 43
|
||||
# define NEED_STRTOUL
|
||||
#endif
|
||||
|
||||
#if defined(__osf__) && defined(__alpha) && defined(BSD) && (BSD < 199103)
|
||||
# undef BSD
|
||||
# define BSD 199103
|
||||
#endif
|
||||
|
||||
#if defined(_AUX_SOURCE)
|
||||
# define vfork fork
|
||||
# define NEED_STRERROR
|
||||
# define NEED_STRTOUL
|
||||
# define SIG_FN void
|
||||
# define USE_MEMCPY
|
||||
#endif
|
||||
|
||||
#if defined(apollo)
|
||||
# define HAVE_STDLIB_H
|
||||
#endif
|
||||
|
||||
#if defined(SVR4) && !defined(SYSV)
|
||||
# define SYSV
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_SOURCE) || defined(__sgi) || defined(__ultrix) || \
|
||||
defined(__hpux) || (defined(BSD) && (BSD >= 199103)) || \
|
||||
defined(sun) || defined(__m88k__)
|
||||
# define USE_POSIX
|
||||
#endif
|
||||
|
||||
#if defined(__ultrix) && !defined(BSD)
|
||||
# define BSD 42
|
||||
#endif
|
||||
|
||||
#if defined(host_mips) && defined(SYSTYPE_BSD43)
|
||||
# define RISCOS_BSD
|
||||
#endif
|
||||
|
||||
#if defined(SYSV) || defined(__ultrix) || defined(__osf__) \
|
||||
|| (defined(BSD) && BSD >= 199306) || defined(linux)
|
||||
# define USE_UTIME
|
||||
# define HAVE_SETVBUF
|
||||
#endif
|
||||
|
||||
#if defined(SYSV) && !defined(SVR4)
|
||||
# define vfork fork
|
||||
#endif
|
||||
|
||||
#if defined(sun) || defined(SVR4)
|
||||
# define NETREAD_BROKEN
|
||||
#endif
|
||||
|
||||
#if defined(BSD) && BSD >= 199006 && !defined(i386) && !defined(RISCOS_BSD)
|
||||
# define HAVE_DAEMON
|
||||
#endif
|
||||
|
||||
#if !defined(BSD) || (BSD <= 199006)
|
||||
# if !defined(NeXT) && !defined(WINNT)
|
||||
# define NEED_INETADDR
|
||||
# endif
|
||||
# define NEED_INETATON
|
||||
#endif
|
||||
|
||||
#if defined(__hpux)
|
||||
# if defined(__STDC__)
|
||||
# define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e)
|
||||
# define ctime(x) ctime((const time_t *)x)
|
||||
# endif /*__STDC__*/
|
||||
# if !defined(SYSV)
|
||||
# define USE_UTIME
|
||||
# define setlinebuf(x) setvbuf(x, NULL, _IOLBF, BUFSIZ)
|
||||
# if !defined(SIGWINCH) /*pre 9.0*/
|
||||
# define SIGWINCH SIGWINDOW
|
||||
# endif
|
||||
# endif /*SYSV*/
|
||||
/* XXX: better autodetection of the need for "struct linger" would be nice */
|
||||
# if 0
|
||||
struct linger {
|
||||
int l_onoff; /* option on/off */
|
||||
int l_linger; /* linger time */
|
||||
};
|
||||
# endif
|
||||
#endif /*__hpux*/
|
||||
|
||||
#if defined(_SEQUENT_)
|
||||
# include <netinet/in_systm.h>
|
||||
# define USE_UTIME
|
||||
# define USE_POSIX
|
||||
# define NEED_GETTIMEOFDAY
|
||||
# define _TIMEZONE timezoneBSD
|
||||
struct timezoneBSD {
|
||||
int tz_minuteswest;
|
||||
int tz_dsttime;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef __P
|
||||
# if defined(__STDC__) || defined(__GNUC__)
|
||||
# define __P(x) x
|
||||
# else
|
||||
# define __P(x) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef _TIMEZONE
|
||||
# define _TIMEZONE timezone
|
||||
#endif
|
||||
|
||||
#if defined(USE_POSIX) || defined(HAVE_STDLIB_H)
|
||||
# include <stdlib.h>
|
||||
# if defined(__ultrix)
|
||||
# define NEED_STRDUP
|
||||
# endif
|
||||
|
||||
#else
|
||||
|
||||
# if !defined(_SCO_DS)
|
||||
# define NEED_STRDUP
|
||||
# define NEED_STRTOUL
|
||||
# endif
|
||||
|
||||
#ifndef WINNT
|
||||
# if !defined(NeXT) && !defined(WINNT)
|
||||
extern char *getenv __P((char *));
|
||||
# else
|
||||
extern char *getenv __P((const char *));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# if !defined(DMALLOC) && !defined(NeXT) && !defined(WINNT)
|
||||
extern char *malloc(), *realloc(), *calloc();
|
||||
extern void free();
|
||||
# endif
|
||||
|
||||
#endif /*HAVE_STDLIB_H*/
|
||||
|
||||
#if defined(USE_POSIX)
|
||||
# include <unistd.h>
|
||||
# include <limits.h>
|
||||
|
||||
#else
|
||||
|
||||
# define STDIN_FILENO 0
|
||||
# define STDOUT_FILENO 1
|
||||
# define STDERR_FILENO 2
|
||||
#ifndef WINNT
|
||||
extern int errno;
|
||||
#endif
|
||||
|
||||
extern int getdtablesize __P((void));
|
||||
# ifdef SHORT_FNAMES
|
||||
extern long pathconf __P((const char *path, int name));
|
||||
# endif
|
||||
|
||||
#endif /*USE_POSIX*/
|
||||
|
||||
#ifndef UINT_MAX
|
||||
# ifdef __STDC__
|
||||
# define UINT_MAX 4294967295u /* max value of an "u_int" */
|
||||
# else
|
||||
# define UINT_MAX ((unsigned)4294967295) /* max value of an "u_int" */
|
||||
# endif
|
||||
# define ULONG_MAX UINT_MAX /* max decimal value of a "u_long" */
|
||||
#endif
|
||||
|
||||
#ifndef INT_MAX
|
||||
# define INT_MAX 2147483647 /* max decimal value of an "int" */
|
||||
#endif
|
||||
|
||||
#ifndef RAND_MAX
|
||||
# define RAND_MAX 0x7fffffff
|
||||
#endif
|
||||
|
||||
#ifndef IN_LOOPBACKNET
|
||||
# define IN_LOOPBACKNET 127
|
||||
#endif
|
||||
|
||||
#ifndef INADDR_NONE
|
||||
# define INADDR_NONE 0xffffffff
|
||||
#endif
|
||||
|
||||
#if defined(apollo)
|
||||
/* Defined in /usr/include/netinet/in.h but doesn't work */
|
||||
#undef IP_OPTIONS
|
||||
#endif
|
||||
|
||||
#if !defined(__STDC__) && !defined(const) && !defined(WINNT)
|
||||
# define const /*constant*/
|
||||
#endif
|
||||
|
||||
#if !defined(__convex__) && (!defined(BSD) || (BSD < 199103))
|
||||
int strcasecmp __P((const char *, const char *));
|
||||
#endif
|
||||
|
||||
/* is USE_POSIX the right thing to use here? */
|
||||
#if (!defined(BSD) || (BSD <= 43)) && \
|
||||
!defined(NeXT) && \
|
||||
!defined(WINNT) && \
|
||||
!defined(__convex__) && \
|
||||
!defined(USE_POSIX)
|
||||
# if !defined(NCR)
|
||||
extern void syslog();
|
||||
# endif
|
||||
extern char *ctime __P((const time_t *clock));
|
||||
# if !defined(M_UNIX)
|
||||
extern int close(), setitimer(), recv(), sendto(), sigsetmask(),
|
||||
atoi(), getpid(), fork(), read(), ioctl(),
|
||||
setsockopt(), socket(), bind();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(bcopy) /* some machines have their own macros for this */
|
||||
#if (defined(USE_POSIX) && !defined(SUNOS4)) || defined(WINNT) ||\
|
||||
(defined(__STDC__) && !defined(sun) && !defined(sequent) \
|
||||
&& !defined(M_UNIX))
|
||||
/* use ANSI C3.159-1989 (``ANSI C'') functions if possible;
|
||||
* ideally we would change the code to use them and then
|
||||
* define them in terms of bcopy et al if !defined(__STDC__)
|
||||
* but that's more work.
|
||||
*/
|
||||
#if defined(USE_MEMCPY)
|
||||
# define bcopy(a,b,c) memcpy(b,a,c)
|
||||
#else
|
||||
# define bcopy(a,b,c) memmove(b,a,c)
|
||||
#endif
|
||||
# define bzero(a,b) memset(a,0,b)
|
||||
# define bcmp(a,b,c) memcmp(a,b,c)
|
||||
# else
|
||||
extern void bcopy();
|
||||
extern void bzero();
|
||||
extern int bcmp();
|
||||
# endif /* BSD */
|
||||
#endif /* bcopy */
|
||||
|
||||
#if (!defined(BSD) || (BSD < 43) || defined(RISCOS_BSD)) \
|
||||
&& !defined(USE_POSIX) && !defined(apollo) && !defined(sequent) \
|
||||
&& !defined(M_UNIX) && !defined(WINNT)
|
||||
# define NEED_STRERROR
|
||||
#if !defined(ultrix) && !defined(NCR)
|
||||
# define NEED_PUTENV
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(SUNOS4)
|
||||
# define NEED_STRERROR
|
||||
# if defined(sun386)
|
||||
# define pid_t int
|
||||
# define NEED_STRCASECMP
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if (!defined(BSD) || (BSD < 43)) && !defined(__hpux)
|
||||
# define NEED_MKSTEMP
|
||||
# if !defined(__ultrix) && !defined(apollo) && !defined(WINNT)
|
||||
# if !defined(_SCO_DS)
|
||||
# define NEED_STRCASECMP
|
||||
# define NEED_MKTEMP
|
||||
# if !defined(SVR4)
|
||||
# define NEED_STRPBRK
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_POSIX)
|
||||
# define POSIX_SIGNALS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Attempt to configure for type of function returned by signal-catching
|
||||
* functions (which signal and sigvec.sv_handler take a pointer to).
|
||||
* This can guess for BSD; otherwise, define SIG_FN externally.
|
||||
*/
|
||||
#ifndef SIG_FN
|
||||
# ifdef BSD
|
||||
# if (BSD >= 199006) || defined(NeXT) || defined(__osf__) || defined(sun) \
|
||||
|| defined(__ultrix) || defined(apollo) || defined(POSIX_SIGNALS)
|
||||
# define SIG_FN void /* signal-catching functions return void */
|
||||
# else
|
||||
# define SIG_FN int /* signal-catching functions return int */
|
||||
# endif
|
||||
# else /*BSD*/
|
||||
# define SIG_FN void /* signal-catching functions return void */
|
||||
# endif /*BSD*/
|
||||
#endif
|
||||
|
||||
#if !defined(SIGUSR1) && !defined(SIGUSR2)
|
||||
# define SIGUSR1 SIGEMT
|
||||
# define SIGUSR2 SIGFPE
|
||||
#endif
|
||||
#if !defined(SIGCHLD)
|
||||
# define SIGCHLD SIGCLD
|
||||
#endif
|
||||
|
||||
#if !defined(ntohl) && !defined(htonl) && defined(BSD) && (BSD <= 43)
|
||||
/* if these aren't null macros in netinet/in.h, extern them here. */
|
||||
extern u_short htons __P((u_short)), ntohs __P((u_short));
|
||||
extern u_long htonl __P((u_long)), ntohl __P((u_long));
|
||||
#endif
|
||||
|
||||
#if defined(USE_POSIX) && !defined(sun) && !defined(__sgi) \
|
||||
&& !defined(__convex__) && !defined(__ultrix) && !defined(_AUX_SOURCE)
|
||||
# define PORT_NONBLOCK O_NONBLOCK
|
||||
# define PORT_WOULDBLK EAGAIN
|
||||
#else
|
||||
#if !defined(WINNT)
|
||||
# define PORT_NONBLOCK O_NDELAY
|
||||
# define PORT_WOULDBLK EWOULDBLOCK
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(USE_POSIX)
|
||||
# define USE_SETSID
|
||||
#endif
|
||||
|
||||
#if defined(USE_POSIX) || !defined(SYSV)
|
||||
#define USE_WAITPID
|
||||
#endif
|
||||
|
||||
#if !defined(USE_POSIX) && !defined(WINNT)
|
||||
#define waitpid(x,y,z) (wait3(y,z,(struct rusage *)NULL))
|
||||
#endif
|
||||
|
||||
#if defined(NeXT) || defined(_AIX) || defined(sun386)
|
||||
# undef WIFEXITED
|
||||
# undef WEXITSTATUS
|
||||
# undef WIFSIGNALED
|
||||
# undef WTERMSIG
|
||||
#endif /* NeXT */
|
||||
|
||||
#if defined(sequent)
|
||||
#define WEXITSTATUS(x) ((x).w_retcode)
|
||||
#define WTERMSIG(x) ((x).w_termsig)
|
||||
#endif /* sequent */
|
||||
|
||||
#ifndef WINNT
|
||||
#if !defined(WIFEXITED)
|
||||
# define WIFEXITED(x) (!(x & 0177))
|
||||
#endif
|
||||
#if !defined(WEXITSTATUS)
|
||||
# define WEXITSTATUS(x) (x >> 8)
|
||||
#endif
|
||||
#if !defined(WIFSIGNALED)
|
||||
# define WIFSIGNALED(x) ((x & 0177) && ((x & 0377) != 0177))
|
||||
#endif
|
||||
#if !defined(WTERMSIG)
|
||||
# define WTERMSIG(x) (x & 0177)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef S_ISDIR
|
||||
# ifndef S_IFMT
|
||||
# define S_IFMT 0170000
|
||||
# endif
|
||||
# ifndef S_IFDIR
|
||||
# define S_IFDIR 0040000
|
||||
# endif
|
||||
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISREG
|
||||
# ifndef S_IFMT
|
||||
# define S_IFMT 0170000
|
||||
# endif
|
||||
# ifndef S_IFREG
|
||||
# define S_IFREG 0100000
|
||||
# endif
|
||||
# define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
|
||||
#endif
|
||||
|
||||
#ifndef S_ISFIFO
|
||||
# ifndef S_IFMT
|
||||
# define S_IFMT 0170000
|
||||
# endif
|
||||
# ifndef S_IFIFO
|
||||
# define S_IFIFO 0010000
|
||||
# endif
|
||||
# define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
|
||||
#endif
|
||||
|
||||
#if defined(NEED_STRTOUL) && \
|
||||
(defined(__ultrix) || defined(__osf__) || defined(NeXT) || defined(WINNT))
|
||||
# undef NEED_STRTOUL
|
||||
#endif
|
||||
|
||||
#if defined(__ultrix) || defined(__osf__)
|
||||
# define MAYBE_HESIOD
|
||||
#endif
|
||||
|
||||
#ifndef FD_SET
|
||||
#define NFDBITS 32
|
||||
#define FD_SETSIZE 32
|
||||
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
|
||||
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
|
||||
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
|
||||
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(x, y) ((x > y) ?y :x)
|
||||
#endif
|
||||
#ifndef MAX
|
||||
# define MAX(x, y) ((x > y) ?x :y)
|
||||
#endif
|
||||
|
||||
#if !defined(PATH_MAX)
|
||||
# if defined(_POSIX_PATH_MAX)
|
||||
# define PATH_MAX _POSIX_PATH_MAX
|
||||
# else
|
||||
# if defined(MAXPATHLEN)
|
||||
# define PATH_MAX MAXPATHLEN
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(BSD) || defined(__osf__) || defined(__convex__)
|
||||
# define HAVE_GETRUSAGE
|
||||
#endif
|
||||
|
||||
/* May be set in the Makefile. */
|
||||
#if defined(HAVE_GETRUSAGE)
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Because Convex has true library function feof() which is
|
||||
* patently wrong (it test bit _IOREAD) we need feof() as
|
||||
* a macro.
|
||||
*/
|
||||
#if defined(__convex__) && !defined(feof)
|
||||
# define feof(p) ((p)->_flag&_IOEOF)
|
||||
#endif
|
||||
|
||||
#if defined(M_UNIX) || defined(linux)
|
||||
# define SPURIOUS_ECONNREFUSED
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Assume that a system has fchmod() unless something above says otherwise.
|
||||
*/
|
||||
#if !defined(HAVE_FCHMOD) && !defined(WINNT)
|
||||
# define HAVE_FCHMOD 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Some systems need _res to be linked into text rather than bss.
|
||||
*/
|
||||
#if defined(__m88k__)
|
||||
# define __BIND_RES_TEXT
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Motorola FH40.43 and FH40.44 need specific macros for
|
||||
* get/settimeofday as only one argument seems to be accepted
|
||||
* by the compiler. NULL generates compile errors
|
||||
*/
|
||||
#if defined(__m88k__) && defined(__unix__)
|
||||
# define gettimeofday(tp, tzp) gettimeofday(tp)
|
||||
# define settimeofday(tp, tzp) settimeofday(tp)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* We need to know the IPv6 address family number even on IPv4-only systems.
|
||||
* Note that this is NOT a protocol constant, and that if the system has its
|
||||
* own AF_INET6, different from ours below, all of BIND's libraries and
|
||||
* executables will need to be recompiled after the system <sys/socket.h>
|
||||
* has had this type added. The type number below is correct on most BSD-
|
||||
* derived systems for which AF_INET6 is defined.
|
||||
*/
|
||||
#ifndef AF_INET6
|
||||
#define AF_INET6 24
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Prototype the functions we'll be supplying.
|
||||
*/
|
||||
#ifdef NEED_PUTENV
|
||||
extern int putenv __P((char *));
|
||||
#endif
|
||||
|
||||
#ifdef NEED_GETTIMEOFDAY
|
||||
extern int gettimeofday __P((struct timeval *, struct _TIMEZONE *));
|
||||
#endif
|
||||
|
||||
#if defined(SVR4) && defined(sun)
|
||||
extern int gethostname __P((char *, size_t));
|
||||
#endif
|
||||
|
||||
#ifdef WINNT
|
||||
#undef NEED_STRDUP
|
||||
#endif
|
||||
|
||||
#ifdef NEED_STRDUP
|
||||
extern char *strdup __P((const char *));
|
||||
#endif
|
||||
|
||||
#endif /*__BIND_PORTABILITY_H*/
|
||||
|
||||
#ifdef WINNT /* l kahn new definitions needed for vc++4.0 */
|
||||
#define fstat _fstat
|
||||
#define stat _stat
|
||||
#define fileno _fileno
|
||||
extern BOOL OnWinnt();
|
||||
#endif
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
* @(#)pathnames.h 5.4 (Berkeley) 6/1/90
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* ++Copyright++ 1989
|
||||
* -
|
||||
* Copyright (c) 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.
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* 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, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION 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.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
|
||||
#ifdef _PATH_XFER
|
||||
# define _PATH_XFER_PREDEFINED /* probably from Makefile */
|
||||
#endif
|
||||
|
||||
#ifdef WINNT
|
||||
#define _PATH_BOOT "%windir%\\NAMED.BOOT"
|
||||
#define _ALT_PATH_BOOT "%windir%\\NAMED.INI"
|
||||
#ifndef _PATH_XFER
|
||||
# define _PATH_XFER "%windir%\\SYSTEM32\\XFER.EXE"
|
||||
#endif
|
||||
#ifndef _PATH_PIDFILE
|
||||
# define _PATH_PIDFILE "%windir%\\NAMED.PID"
|
||||
#endif
|
||||
/* following paths prepended with GetTempPath() */
|
||||
#define _PATH_DEBUG "NAMED.RUN"
|
||||
#define _PATH_DUMPFILE "NAMDUMP.DB"
|
||||
#define _PATH_STATS "NAMED.STS"
|
||||
#define _PATH_XFERTRACE "XFER.TRC"
|
||||
#define _PATH_XFERDDT "XFER.DDT"
|
||||
#define _PATH_TMPXFER "XFER.DDT.XXXXXX"
|
||||
#else
|
||||
|
||||
#if defined (__sgi) && !defined(_SYSTYPE_SVR4) && !defined(__SYSTYPE_SVR4)
|
||||
#define _PATH_BOOT "/usr/etc/named.d/named.boot"
|
||||
#else
|
||||
#define _PATH_BOOT "/etc/named.boot"
|
||||
#endif
|
||||
|
||||
#if defined(BSD) && BSD >= 198810
|
||||
|
||||
#include <paths.h>
|
||||
#ifndef _PATH_XFER
|
||||
# define _PATH_XFER "/usr/libexec/named-xfer"
|
||||
#endif
|
||||
#define _PATH_DEBUG "named.run"
|
||||
#define _PATH_DUMPFILE "named_dump.db"
|
||||
#ifndef _PATH_PIDFILE
|
||||
# define _PATH_PIDFILE "/var/run/named.pid"
|
||||
#endif
|
||||
#define _PATH_STATS "named.stats"
|
||||
#define _PATH_XFERTRACE "xfer.trace"
|
||||
#define _PATH_XFERDDT "xfer.ddt"
|
||||
#define _PATH_TMPXFER "xfer.ddt.XXXXXX"
|
||||
#define _PATH_TMPDIR "/var/tmp"
|
||||
|
||||
#else /* BSD */
|
||||
|
||||
#define _PATH_DEVNULL "/dev/null"
|
||||
#define _PATH_TTY "/dev/tty"
|
||||
#ifndef _PATH_XFER
|
||||
# define _PATH_XFER "/etc/named-xfer"
|
||||
#endif
|
||||
#define _PATH_DEBUG "named.run"
|
||||
#define _PATH_DUMPFILE "named_dump.db"
|
||||
#ifndef _PATH_PIDFILE
|
||||
# define _PATH_PIDFILE "/etc/named.pid"
|
||||
#endif
|
||||
#define _PATH_STATS "named.stats"
|
||||
#define _PATH_XFERTRACE "xfer.trace"
|
||||
#define _PATH_XFERDDT "xfer.ddt"
|
||||
#define _PATH_TMPXFER "xfer.ddt.XXXXXX"
|
||||
#define _PATH_TMPDIR "/usr/tmp"
|
||||
#endif /* BSD */
|
||||
|
||||
#ifndef _PATH_XFER_PREDEFINED
|
||||
# if defined(__sgi) || defined(NeXT) || defined(__ultrix)
|
||||
# undef _PATH_XFER
|
||||
# define _PATH_XFER "/usr/etc/named-xfer"
|
||||
# endif
|
||||
# if defined(__osf__)
|
||||
# undef _PATH_XFER
|
||||
# define _PATH_XFER "/usr/sbin/named-xfer"
|
||||
# endif
|
||||
# ifdef sun
|
||||
# undef _PATH_XFER
|
||||
# define _PATH_XFER "/usr/etc/in.named-xfer"
|
||||
# endif
|
||||
#else
|
||||
# undef _PATH_XFER_PREDEFINED
|
||||
#endif /*_PATH_XFER_PREDEFINED*/
|
||||
|
||||
#endif /* WINNT */
|
||||
@@ -1,72 +0,0 @@
|
||||
# $Id$
|
||||
|
||||
# ++Copyright++
|
||||
# -
|
||||
# Copyright (c) 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.
|
||||
# -
|
||||
# Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
#
|
||||
# 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, and that
|
||||
# the name of Digital Equipment Corporation not be used in advertising or
|
||||
# publicity pertaining to distribution of the document or software without
|
||||
# specific, written prior permission.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
# WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
# OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
# CORPORATION 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.
|
||||
# -
|
||||
# --Copyright--
|
||||
|
||||
HFILES = cdefs.h bitypes.h
|
||||
|
||||
DESTDIR=
|
||||
DESTINC= /usr/include
|
||||
|
||||
all depend:
|
||||
|
||||
clean:
|
||||
rm -f *~ *.BAK *.CKP *.orig
|
||||
|
||||
install: ${DESTDIR}${DESTINC}/sys
|
||||
for x in ${HFILES}; do \
|
||||
${INSTALL} -c -m 444 $$x ${DESTDIR}${DESTINC}/sys/$$x; \
|
||||
done
|
||||
|
||||
${DESTDIR}${DESTINC}/sys:
|
||||
mkdir $@
|
||||
@@ -1,90 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* ++Copyright++ 1993
|
||||
* -
|
||||
* Copyright (c) 1993 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.
|
||||
* -
|
||||
* Portions Copyright (c) 1993 by Digital Equipment Corporation.
|
||||
*
|
||||
* 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, and that
|
||||
* the name of Digital Equipment Corporation not be used in advertising or
|
||||
* publicity pertaining to distribution of the document or software without
|
||||
* specific, written prior permission.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
|
||||
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
|
||||
* CORPORATION 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.
|
||||
* -
|
||||
* --Copyright--
|
||||
*/
|
||||
|
||||
#ifndef __BIT_TYPES_DEFINED__
|
||||
# if (defined(BSD) && (BSD >= 199306)) || \
|
||||
(defined(_BSDI_VERSION) && (_BSDI_VERSION >= 199312))
|
||||
# define __BIT_TYPES_DEFINED__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef __BIT_TYPES_DEFINED__
|
||||
#define __BIT_TYPES_DEFINED__
|
||||
|
||||
#ifdef __linux__
|
||||
#include <linux/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Basic integral types. Omit the typedef if
|
||||
* not possible for a machine/compiler combination.
|
||||
*/
|
||||
typedef /*signed*/ char int8_t;
|
||||
typedef unsigned char u_int8_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned short u_int16_t;
|
||||
typedef int int32_t;
|
||||
typedef unsigned int u_int32_t;
|
||||
|
||||
# if 0 /* don't fight with these unless you need them */
|
||||
typedef long long int64_t;
|
||||
typedef unsigned long long u_int64_t;
|
||||
# endif
|
||||
|
||||
#endif /* __BIT_TYPES_DEFINED__ */
|
||||
@@ -1,143 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Berkeley Software Design, Inc.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @(#)cdefs.h 8.7 (Berkeley) 1/21/94
|
||||
*/
|
||||
|
||||
#ifndef _CDEFS_H_
|
||||
#define _CDEFS_H_
|
||||
|
||||
/* POSIX.2 feature test macro: enable POSIX.1 and/or more */
|
||||
#if _POSIX_C_SOURCE == 1 || _POSIX_C_SOURCE == 2
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(_POSIX_SOURCE) || defined(__STRICT_ANSI__)
|
||||
#define _ANSI_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#define __BEGIN_DECLS extern "C" {
|
||||
#define __END_DECLS };
|
||||
#else
|
||||
#define __BEGIN_DECLS
|
||||
#define __END_DECLS
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
|
||||
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
|
||||
* The __CONCAT macro is a bit tricky -- make sure you don't put spaces
|
||||
* in between its arguments. __CONCAT can also concatenate double-quoted
|
||||
* strings produced by the __STRING macro, but this only works with ANSI C.
|
||||
*/
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#define __P(protos) protos /* full-blown ANSI C */
|
||||
#define __CONCAT(x,y) x ## y
|
||||
#define __STRING(x) #x
|
||||
|
||||
#define __const const /* define reserved names to standard */
|
||||
#define __signed signed
|
||||
#define __volatile volatile
|
||||
#if defined(__cplusplus)
|
||||
#define __inline inline /* convert to C++ keyword */
|
||||
#else
|
||||
#ifndef __GNUC__
|
||||
#define __inline /* delete GCC keyword */
|
||||
#endif /* !__GNUC__ */
|
||||
#endif /* !__cplusplus */
|
||||
|
||||
#else /* !(__STDC__ || __cplusplus) */
|
||||
#define __P(protos) () /* traditional C preprocessor */
|
||||
#define __CONCAT(x,y) x/**/y
|
||||
#define __STRING(x) "x"
|
||||
|
||||
#ifndef WINNT
|
||||
#ifndef __GNUC__
|
||||
#define __const /* delete pseudo-ANSI C keywords */
|
||||
#define __inline
|
||||
#define __signed
|
||||
#define __volatile
|
||||
#endif
|
||||
/*
|
||||
* In non-ANSI C environments, new programs will want ANSI-only C keywords
|
||||
* deleted from the program and old programs will want them left alone.
|
||||
* When using a compiler other than gcc, programs using the ANSI C keywords
|
||||
* const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
|
||||
* When using "gcc -traditional", we assume that this is the intent; if
|
||||
* __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
|
||||
*/
|
||||
#ifndef NO_ANSI_KEYWORDS
|
||||
#define const /* delete ANSI C keywords */
|
||||
#define inline
|
||||
#define signed
|
||||
#define volatile
|
||||
#endif /* WINNT */
|
||||
#endif /* !__GNUC__ */
|
||||
#endif /* !(__STDC__ || __cplusplus) */
|
||||
|
||||
/*
|
||||
* GCC1 and some versions of GCC2 declare dead (non-returning) and
|
||||
* pure (no side effects) functions using "volatile" and "const";
|
||||
* unfortunately, these then cause warnings under "-ansi -pedantic".
|
||||
* GCC2 uses a new, peculiar __attribute__((attrs)) style. All of
|
||||
* these work for GNU C++ (modulo a slight glitch in the C++ grammar
|
||||
* in the distribution version of 2.5.5).
|
||||
*/
|
||||
#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 5
|
||||
#define __attribute__(x) /* delete __attribute__ if non-gcc or gcc1 */
|
||||
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
|
||||
#define __dead __volatile
|
||||
#define __pure __const
|
||||
#endif
|
||||
#endif
|
||||
/* The following lines were added for newer versions of GNU C
|
||||
* Ed Lewis - Sept 1996 lewis@tis.com
|
||||
*/
|
||||
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 || __GNUC__ >= 3
|
||||
#define __dead
|
||||
#define __dead2 __attribute__((noreturn))
|
||||
#define __pure
|
||||
#define __pure2 __attribute__((const))
|
||||
#endif
|
||||
|
||||
|
||||
/* Delete pseudo-keywords wherever they are not available or needed. */
|
||||
#ifndef __dead
|
||||
#define __dead
|
||||
#define __pure
|
||||
#endif
|
||||
|
||||
#endif /* !_CDEFS_H_ */
|
||||
Reference in New Issue
Block a user