require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_ALTQ_ALTQ_VAR_H_)) {
    eval 'sub _ALTQ_ALTQ_VAR_H_ () {1;}' unless defined(&_ALTQ_ALTQ_VAR_H_);
    if(defined(&_KERNEL)) {
	require 'sys/param.ph';
	require 'sys/kernel.ph';
	require 'sys/queue.ph';
	unless(defined(&ALTQ_RED)) {
	    eval 'sub ALTQ_RED () {1;}' unless defined(&ALTQ_RED);
	}
	unless(defined(&ALTQ_CBQ)) {
	    eval 'sub ALTQ_CBQ () {1;}' unless defined(&ALTQ_CBQ);
	}
	unless(defined(&ALTQ_PRIQ)) {
	    eval 'sub ALTQ_PRIQ () {1;}' unless defined(&ALTQ_PRIQ);
	}
	unless(defined(&ALTQ_HFSC)) {
	    eval 'sub ALTQ_HFSC () {1;}' unless defined(&ALTQ_HFSC);
	}
	if(defined(&ALTQ_DEBUG)) {
	    if(defined(&__STDC__)) {
		eval 'sub ASSERT {
		    my($e) = @_;
    		    eval q((($e) ? ( &void)0:  &altq_assert( &__FILE__,  &__LINE__, $e)));
		}' unless defined(&ASSERT);
	    } else {
		eval 'sub ASSERT {
		    my($e) = @_;
    		    eval q((($e) ? ( &void)0:  &altq_assert( &__FILE__,  &__LINE__, \\"e\\")));
		}' unless defined(&ASSERT);
	    }
	} else {
	    eval 'sub ASSERT {
	        my($e) = @_;
    		eval q((( &void)0));
	    }' unless defined(&ASSERT);
	}
	require 'sys/timeout.ph';
	eval 'sub CALLOUT_INIT {
	    my($c) = @_;
    	    eval q( &do {  &bzero(($c), $sizeof{($c)}); }  &while (0));
	}' unless defined(&CALLOUT_INIT);
	eval 'sub CALLOUT_RESET {
	    my($c,$t,$f,$a) = @_;
    	    eval q( &do {  &if (! &timeout_initialized(($c)-> &c_to))  &timeout_set(($c)-> &c_to, ($f), ($a));  &timeout_add(($c)-> &c_to, ($t)); }  &while (0));
	}' unless defined(&CALLOUT_RESET);
	eval 'sub CALLOUT_STOP {
	    my($c) = @_;
    	    eval q( &timeout_del(($c)-> &c_to));
	}' unless defined(&CALLOUT_STOP);
	eval 'sub CALLOUT_INITIALIZER () {{ { {  &NULL },  &NULL,  &NULL, 0, 0} };}' unless defined(&CALLOUT_INITIALIZER);
	eval 'sub m_pktlen {
	    my($m) = @_;
    	    eval q((($m)-> ($m_pkthdr->{len})));
	}' unless defined(&m_pktlen);
    }
}
1;
