require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_TCPD_H_)) {
    eval 'sub _TCPD_H_ () {1;}' unless defined(&_TCPD_H_);
    require 'sys/cdefs.ph';
    eval 'sub STRING_LENGTH () {256;}' unless defined(&STRING_LENGTH);
    eval 'sub STRN_CPY {
        my($d,$s,$l) = @_;
	    eval q({  &strncpy(($d),($s),($l)); ($d)[($l)-1] = 0; });
    }' unless defined(&STRN_CPY);
    eval 'sub STRN_EQ {
        my($x,$y,$l) = @_;
	    eval q(( &strncasecmp(($x),($y),($l)) == 0));
    }' unless defined(&STRN_EQ);
    eval 'sub STRN_NE {
        my($x,$y,$l) = @_;
	    eval q(( &strncasecmp(($x),($y),($l)) != 0));
    }' unless defined(&STRN_NE);
    eval 'sub STR_EQ {
        my($x,$y) = @_;
	    eval q(( &strcasecmp(($x),($y)) == 0));
    }' unless defined(&STR_EQ);
    eval 'sub STR_NE {
        my($x,$y) = @_;
	    eval q(( &strcasecmp(($x),($y)) != 0));
    }' unless defined(&STR_NE);
    eval 'sub STRING_UNKNOWN () {"unknown";}' unless defined(&STRING_UNKNOWN);
    eval 'sub STRING_PARANOID () {"paranoid";}' unless defined(&STRING_PARANOID);
    eval 'sub HOSTNAME_KNOWN {
        my($s) = @_;
	    eval q(( &STR_NE(($s), &unknown)  &&  &STR_NE(($s), &paranoid)));
    }' unless defined(&HOSTNAME_KNOWN);
    eval 'sub NOT_INADDR {
        my($s) = @_;
	    eval q(($s->[ &strspn($s,\\"01234567890./\\")] != 0));
    }' unless defined(&NOT_INADDR);
    if(defined(&__cplusplus)) {
    }
    eval 'sub fromhost () { &sock_host;}' unless defined(&fromhost);
    if(defined(&_STDIO_H_)) {
    }
    if(defined(&__cplusplus)) {
    }
    eval 'sub RQ_FILE () {1;}' unless defined(&RQ_FILE);
    eval 'sub RQ_DAEMON () {2;}' unless defined(&RQ_DAEMON);
    eval 'sub RQ_USER () {3;}' unless defined(&RQ_USER);
    eval 'sub RQ_CLIENT_NAME () {4;}' unless defined(&RQ_CLIENT_NAME);
    eval 'sub RQ_CLIENT_ADDR () {5;}' unless defined(&RQ_CLIENT_ADDR);
    eval 'sub RQ_CLIENT_SIN () {6;}' unless defined(&RQ_CLIENT_SIN);
    eval 'sub RQ_SERVER_NAME () {7;}' unless defined(&RQ_SERVER_NAME);
    eval 'sub RQ_SERVER_ADDR () {8;}' unless defined(&RQ_SERVER_ADDR);
    eval 'sub RQ_SERVER_SIN () {9;}' unless defined(&RQ_SERVER_SIN);
    eval 'sub eval_daemon {
        my($r) = @_;
	    eval q((($r)-> &daemon));
    }' unless defined(&eval_daemon);
    eval 'sub eval_pid {
        my($r) = @_;
	    eval q((($r)-> &pid));
    }' unless defined(&eval_pid);
    eval 'sub sock_methods {
        my($r) = @_;
	    eval q({ ($r)-> &hostname =  &sock_hostname; ($r)-> &hostaddr =  &sock_hostaddr; });
    }' unless defined(&sock_methods);
    eval 'sub AC_PERMIT () {1;}' unless defined(&AC_PERMIT);
    eval 'sub AC_DENY () {(-1);}' unless defined(&AC_DENY);
    eval 'sub AC_ERROR () { &AC_DENY;}' unless defined(&AC_ERROR);
}
1;
