require '_h2ph_pre.ph';

unless(defined(&_POWERPC_INTR_H_)) {
    eval 'sub _POWERPC_INTR_H_ () {1;}' unless defined(&_POWERPC_INTR_H_);
    eval 'sub IPL_BIO () {0;}' unless defined(&IPL_BIO);
    eval 'sub IPL_AUDIO () { &IPL_BIO;}' unless defined(&IPL_AUDIO);
    eval 'sub IPL_NET () {1;}' unless defined(&IPL_NET);
    eval 'sub IPL_TTY () {2;}' unless defined(&IPL_TTY);
    eval 'sub IPL_IMP () {3;}' unless defined(&IPL_IMP);
    eval 'sub IPL_CLOCK () {4;}' unless defined(&IPL_CLOCK);
    eval 'sub IPL_NONE () {5;}' unless defined(&IPL_NONE);
    eval 'sub IPL_HIGH () {6;}' unless defined(&IPL_HIGH);
    eval 'sub IST_NONE () {0;}' unless defined(&IST_NONE);
    eval 'sub IST_PULSE () {1;}' unless defined(&IST_PULSE);
    eval 'sub IST_EDGE () {2;}' unless defined(&IST_EDGE);
    eval 'sub IST_LEVEL () {3;}' unless defined(&IST_LEVEL);
    unless(defined(&_LOCORE)) {
	eval 'sub PPC_NIRQ () {65;}' unless defined(&PPC_NIRQ);
	eval 'sub PPC_CLK_IRQ () {64;}' unless defined(&PPC_CLK_IRQ);
	eval 'sub splassert {
	    local($wantipl) = @_;
    	    eval q();
	}' unless defined(&splassert);
	eval 'sub SINT_CLOCK () {0x10000000;}' unless defined(&SINT_CLOCK);
	eval 'sub SINT_NET () {0x20000000;}' unless defined(&SINT_NET);
	eval 'sub SINT_TTY () {0x40000000;}' unless defined(&SINT_TTY);
	eval 'sub SPL_CLOCK () {0x80000000;}' unless defined(&SPL_CLOCK);
	eval 'sub SINT_MASK () {( &SINT_CLOCK| &SINT_NET| &SINT_TTY);}' unless defined(&SINT_MASK);
	eval 'sub splbio () {
	    eval q( &splraise( $imask[ &IPL_BIO]));
	}' unless defined(&splbio);
	eval 'sub splnet () {
	    eval q( &splraise( $imask[ &IPL_NET]));
	}' unless defined(&splnet);
	eval 'sub spltty () {
	    eval q( &splraise( $imask[ &IPL_TTY]));
	}' unless defined(&spltty);
	eval 'sub splimp () {
	    eval q( &splraise( $imask[ &IPL_IMP]));
	}' unless defined(&splimp);
	eval 'sub splaudio () {
	    eval q( &splraise( $imask[ &IPL_AUDIO]));
	}' unless defined(&splaudio);
	eval 'sub splclock () {
	    eval q( &splraise( $imask[ &IPL_CLOCK]));
	}' unless defined(&splclock);
	eval 'sub splvm () {
	    eval q( &splraise( $imask[ &IPL_IMP]));
	}' unless defined(&splvm);
	eval 'sub splstatclock () {
	    eval q( &splhigh());
	}' unless defined(&splstatclock);
	eval 'sub spllowersoftclock () {
	    eval q( &spllower( &SINT_CLOCK));
	}' unless defined(&spllowersoftclock);
	eval 'sub splsoftclock () {
	    eval q( &splraise( &SINT_CLOCK));
	}' unless defined(&splsoftclock);
	eval 'sub splsoftnet () {
	    eval q( &splraise( &SINT_NET));
	}' unless defined(&splsoftnet);
	eval 'sub splsofttty () {
	    eval q( &splraise( &SINT_TTY));
	}' unless defined(&splsofttty);
	eval 'sub setsoftclock () {
	    eval q( &set_sint( &SINT_CLOCK););
	}' unless defined(&setsoftclock);
	eval 'sub setsoftnet () {
	    eval q( &set_sint( &SINT_NET););
	}' unless defined(&setsoftnet);
	eval 'sub setsofttty () {
	    eval q( &set_sint( &SINT_TTY););
	}' unless defined(&setsofttty);
	eval 'sub splhigh () {
	    eval q( &splraise(0xffffffff));
	}' unless defined(&splhigh);
	eval 'sub spl0 () {
	    eval q( &spllower(0));
	}' unless defined(&spl0);
	eval 'sub MAX_PRECONF_INTR () {16;}' unless defined(&MAX_PRECONF_INTR);
    }
}
1;
