require '_h2ph_pre.ph';

unless(defined(&_NAMESER_H_)) {
    eval 'sub _NAMESER_H_ () {1;}' unless defined(&_NAMESER_H_);
    require 'sys/param.ph';
    if((!defined( &BSD)) || ((defined(&BSD) ? &BSD : 0) < 199306)) {
	require 'sys/bitypes.ph';
    } else {
	require 'sys/types.ph';
    }
    require 'sys/cdefs.ph';
    if(defined(&_AUX_SOURCE)) {
	require 'sys/types.ph';
    }
    eval 'sub __BIND () {19960801;}' unless defined(&__BIND);
    eval 'sub PACKETSZ () {512;}' unless defined(&PACKETSZ);
    eval 'sub MAXDNAME () {1025;}' unless defined(&MAXDNAME);
    eval 'sub MAXCDNAME () {255;}' unless defined(&MAXCDNAME);
    eval 'sub MAXLABEL () {63;}' unless defined(&MAXLABEL);
    eval 'sub HFIXEDSZ () {12;}' unless defined(&HFIXEDSZ);
    eval 'sub QFIXEDSZ () {4;}' unless defined(&QFIXEDSZ);
    eval 'sub RRFIXEDSZ () {10;}' unless defined(&RRFIXEDSZ);
    eval 'sub INT32SZ () {4;}' unless defined(&INT32SZ);
    eval 'sub INT16SZ () {2;}' unless defined(&INT16SZ);
    eval 'sub INADDRSZ () {4;}' unless defined(&INADDRSZ);
    eval 'sub IN6ADDRSZ () {16;}' unless defined(&IN6ADDRSZ);
    eval 'sub NAMESERVER_PORT () {53;}' unless defined(&NAMESERVER_PORT);
    eval 'sub QUERY () {0x0;}' unless defined(&QUERY);
    eval 'sub IQUERY () {0x1;}' unless defined(&IQUERY);
    eval 'sub STATUS () {0x2;}' unless defined(&STATUS);
    eval 'sub NS_NOTIFY_OP () {0x4;}' unless defined(&NS_NOTIFY_OP);
    eval 'sub NOERROR () {0;}' unless defined(&NOERROR);
    eval 'sub FORMERR () {1;}' unless defined(&FORMERR);
    eval 'sub SERVFAIL () {2;}' unless defined(&SERVFAIL);
    eval 'sub NXDOMAIN () {3;}' unless defined(&NXDOMAIN);
    eval 'sub NOTIMP () {4;}' unless defined(&NOTIMP);
    eval 'sub REFUSED () {5;}' unless defined(&REFUSED);
    eval 'sub T_A () {1;}' unless defined(&T_A);
    eval 'sub T_NS () {2;}' unless defined(&T_NS);
    eval 'sub T_MD () {3;}' unless defined(&T_MD);
    eval 'sub T_MF () {4;}' unless defined(&T_MF);
    eval 'sub T_CNAME () {5;}' unless defined(&T_CNAME);
    eval 'sub T_SOA () {6;}' unless defined(&T_SOA);
    eval 'sub T_MB () {7;}' unless defined(&T_MB);
    eval 'sub T_MG () {8;}' unless defined(&T_MG);
    eval 'sub T_MR () {9;}' unless defined(&T_MR);
    eval 'sub T_NULL () {10;}' unless defined(&T_NULL);
    eval 'sub T_WKS () {11;}' unless defined(&T_WKS);
    eval 'sub T_PTR () {12;}' unless defined(&T_PTR);
    eval 'sub T_HINFO () {13;}' unless defined(&T_HINFO);
    eval 'sub T_MINFO () {14;}' unless defined(&T_MINFO);
    eval 'sub T_MX () {15;}' unless defined(&T_MX);
    eval 'sub T_TXT () {16;}' unless defined(&T_TXT);
    eval 'sub T_RP () {17;}' unless defined(&T_RP);
    eval 'sub T_AFSDB () {18;}' unless defined(&T_AFSDB);
    eval 'sub T_X25 () {19;}' unless defined(&T_X25);
    eval 'sub T_ISDN () {20;}' unless defined(&T_ISDN);
    eval 'sub T_RT () {21;}' unless defined(&T_RT);
    eval 'sub T_NSAP () {22;}' unless defined(&T_NSAP);
    eval 'sub T_NSAP_PTR () {23;}' unless defined(&T_NSAP_PTR);
    eval 'sub T_SIG () {24;}' unless defined(&T_SIG);
    eval 'sub T_KEY () {25;}' unless defined(&T_KEY);
    eval 'sub T_PX () {26;}' unless defined(&T_PX);
    eval 'sub T_GPOS () {27;}' unless defined(&T_GPOS);
    eval 'sub T_AAAA () {28;}' unless defined(&T_AAAA);
    eval 'sub T_LOC () {29;}' unless defined(&T_LOC);
    eval 'sub T_NXT () {30;}' unless defined(&T_NXT);
    eval 'sub T_EID () {31;}' unless defined(&T_EID);
    eval 'sub T_NIMLOC () {32;}' unless defined(&T_NIMLOC);
    eval 'sub T_SRV () {33;}' unless defined(&T_SRV);
    eval 'sub T_ATMA () {34;}' unless defined(&T_ATMA);
    eval 'sub T_NAPTR () {35;}' unless defined(&T_NAPTR);
    eval 'sub T_UINFO () {100;}' unless defined(&T_UINFO);
    eval 'sub T_UID () {101;}' unless defined(&T_UID);
    eval 'sub T_GID () {102;}' unless defined(&T_GID);
    eval 'sub T_UNSPEC () {103;}' unless defined(&T_UNSPEC);
    eval 'sub T_IXFR () {251;}' unless defined(&T_IXFR);
    eval 'sub T_AXFR () {252;}' unless defined(&T_AXFR);
    eval 'sub T_MAILB () {253;}' unless defined(&T_MAILB);
    eval 'sub T_MAILA () {254;}' unless defined(&T_MAILA);
    eval 'sub T_ANY () {255;}' unless defined(&T_ANY);
    eval 'sub C_IN () {1;}' unless defined(&C_IN);
    eval 'sub C_CHAOS () {3;}' unless defined(&C_CHAOS);
    eval 'sub C_HS () {4;}' unless defined(&C_HS);
    eval 'sub C_ANY () {255;}' unless defined(&C_ANY);
    eval 'sub KEYFLAG_TYPEMASK () {0xc000;}' unless defined(&KEYFLAG_TYPEMASK);
    eval 'sub KEYFLAG_TYPE_AUTH_CONF () {0x0000;}' unless defined(&KEYFLAG_TYPE_AUTH_CONF);
    eval 'sub KEYFLAG_TYPE_CONF_ONLY () {0x8000;}' unless defined(&KEYFLAG_TYPE_CONF_ONLY);
    eval 'sub KEYFLAG_TYPE_AUTH_ONLY () {0x4000;}' unless defined(&KEYFLAG_TYPE_AUTH_ONLY);
    eval 'sub KEYFLAG_TYPE_NO_KEY () {0xc000;}' unless defined(&KEYFLAG_TYPE_NO_KEY);
    eval 'sub KEYFLAG_NO_AUTH () {0x8000;}' unless defined(&KEYFLAG_NO_AUTH);
    eval 'sub KEYFLAG_NO_CONF () {0x4000;}' unless defined(&KEYFLAG_NO_CONF);
    eval 'sub KEYFLAG_EXPERIMENTAL () {0x2000;}' unless defined(&KEYFLAG_EXPERIMENTAL);
    eval 'sub KEYFLAG_RESERVED3 () {0x1000;}' unless defined(&KEYFLAG_RESERVED3);
    eval 'sub KEYFLAG_RESERVED4 () {0x0800;}' unless defined(&KEYFLAG_RESERVED4);
    eval 'sub KEYFLAG_USERACCOUNT () {0x0400;}' unless defined(&KEYFLAG_USERACCOUNT);
    eval 'sub KEYFLAG_ENTITY () {0x0200;}' unless defined(&KEYFLAG_ENTITY);
    eval 'sub KEYFLAG_ZONEKEY () {0x0100;}' unless defined(&KEYFLAG_ZONEKEY);
    eval 'sub KEYFLAG_IPSEC () {0x0080;}' unless defined(&KEYFLAG_IPSEC);
    eval 'sub KEYFLAG_EMAIL () {0x0040;}' unless defined(&KEYFLAG_EMAIL);
    eval 'sub KEYFLAG_RESERVED10 () {0x0020;}' unless defined(&KEYFLAG_RESERVED10);
    eval 'sub KEYFLAG_RESERVED11 () {0x0010;}' unless defined(&KEYFLAG_RESERVED11);
    eval 'sub KEYFLAG_SIGNATORYMASK () {0x000f;}' unless defined(&KEYFLAG_SIGNATORYMASK);
    eval 'sub KEYFLAG_RESERVED_BITMASK () {(  &KEYFLAG_RESERVED3 |  &KEYFLAG_RESERVED4 |  &KEYFLAG_RESERVED10|  &KEYFLAG_RESERVED11);}' unless defined(&KEYFLAG_RESERVED_BITMASK);
    eval 'sub ALGORITHM_MD5RSA () {1;}' unless defined(&ALGORITHM_MD5RSA);
    eval 'sub ALGORITHM_EXPIRE_ONLY () {253;}' unless defined(&ALGORITHM_EXPIRE_ONLY);
    eval 'sub ALGORITHM_PRIVATE_OID () {254;}' unless defined(&ALGORITHM_PRIVATE_OID);
    eval 'sub MIN_MD5RSA_KEY_PART_BITS () {512;}' unless defined(&MIN_MD5RSA_KEY_PART_BITS);
    eval 'sub MAX_MD5RSA_KEY_PART_BITS () {2552;}' unless defined(&MAX_MD5RSA_KEY_PART_BITS);
    eval 'sub MAX_MD5RSA_KEY_BYTES () {(( &MAX_MD5RSA_KEY_PART_BITS+7/8)*2+3);}' unless defined(&MAX_MD5RSA_KEY_BYTES);
    eval 'sub MAX_KEY_BASE64 () {((( &MAX_MD5RSA_KEY_BYTES+2)/3)*4);}' unless defined(&MAX_KEY_BASE64);
    eval 'sub CONV_SUCCESS () {0;}' unless defined(&CONV_SUCCESS);
    eval 'sub CONV_OVERFLOW () {(-1);}' unless defined(&CONV_OVERFLOW);
    eval 'sub CONV_BADFMT () {(-2);}' unless defined(&CONV_BADFMT);
    eval 'sub CONV_BADCKSUM () {(-3);}' unless defined(&CONV_BADCKSUM);
    eval 'sub CONV_BADBUFLEN () {(-4);}' unless defined(&CONV_BADBUFLEN);
    unless(defined(&BYTE_ORDER)) {
	if(((defined(&BSD) ? &BSD : 0) >= 199103)) {
	    require 'machine/endian.ph';
	} else {
	    if(defined(&linux)) {
		require 'endian.ph';
	    } else {
		eval 'sub LITTLE_ENDIAN () {1234;}' unless defined(&LITTLE_ENDIAN);
		eval 'sub BIG_ENDIAN () {4321;}' unless defined(&BIG_ENDIAN);
		eval 'sub PDP_ENDIAN () {3412;}' unless defined(&PDP_ENDIAN);
		if(defined( &vax) || defined( &ns32000) || defined( &sun386) || defined( &i386) || defined( &MIPSEL) || defined( &_MIPSEL) || defined( &BIT_ZERO_ON_RIGHT) || defined( &__alpha__) || defined( &__alpha)) {
		    eval 'sub BYTE_ORDER () { &LITTLE_ENDIAN;}' unless defined(&BYTE_ORDER);
		}
		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)) {
		    eval 'sub BYTE_ORDER () { &BIG_ENDIAN;}' unless defined(&BYTE_ORDER);
		}
	    }
	}
    }
    if(!defined( &BYTE_ORDER) || ((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) != (defined(&BIG_ENDIAN) ? &BIG_ENDIAN : 0)  && (defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) != (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : 0)  && (defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) != (defined(&PDP_ENDIAN) ? &PDP_ENDIAN : 0))) {
    }
    if((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&BIG_ENDIAN) ? &BIG_ENDIAN : 0)) {
    }
    if((defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&LITTLE_ENDIAN) ? &LITTLE_ENDIAN : 0) || (defined(&BYTE_ORDER) ? &BYTE_ORDER : 0) == (defined(&PDP_ENDIAN) ? &PDP_ENDIAN : 0)) {
    }
    eval 'sub INDIR_MASK () {0xc0;}' unless defined(&INDIR_MASK);
    eval 'sub GETSHORT {
        local($s, $cp) = @_;
	    eval q({  &register \'u_char\' * &t_cp = ; = ( $t_cp[0] << 8) | ( $t_cp[1]) ; ($cp) +=  &INT16SZ; });
    }' unless defined(&GETSHORT);
    eval 'sub GETLONG {
        local($l, $cp) = @_;
	    eval q({  &register \'u_char\' * &t_cp = ; = ( $t_cp[0] << 24) | ( $t_cp[1] << 16) | ( $t_cp[2] << 8) | ( $t_cp[3]) ; ($cp) +=  &INT32SZ; });
    }' unless defined(&GETLONG);
    eval 'sub PUTSHORT {
        local($s, $cp) = @_;
	    eval q({  &register  &u_int16_t  &t_s = ;  &register \'u_char\' * &t_cp = ($cp); * &t_cp++ =  &t_s >> 8; * &t_cp =  &t_s; ($cp) +=  &INT16SZ; });
    }' unless defined(&PUTSHORT);
    eval 'sub PUTLONG {
        local($l, $cp) = @_;
	    eval q({  &register  &u_int32_t  &t_l = ;  &register \'u_char\' * &t_cp = ($cp); * &t_cp++ =  &t_l >> 24; * &t_cp++ =  &t_l >> 16; * &t_cp++ =  &t_l >> 8; * &t_cp =  &t_l; ($cp) +=  &INT32SZ; });
    }' unless defined(&PUTLONG);
}
1;
