require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_DEV_PCI_EMU10K1VAR_H_)) {
    eval 'sub _DEV_PCI_EMU10K1VAR_H_ () {1;}' unless defined(&_DEV_PCI_EMU10K1VAR_H_);
    eval 'sub EMU_PCI_CBIO () {0x10;}' unless defined(&EMU_PCI_CBIO);
    eval 'sub EMU_SUBSYS_APS () {0x40011102;}' unless defined(&EMU_SUBSYS_APS);
    eval 'sub KERNADDR {
        my($ptr) = @_;
	    eval q((( &void *)(($ptr)-> &kaddr)));
    }' unless defined(&KERNADDR);
    eval 'sub DMASEGADDR {
        my($ptr, $segno) = @_;
	    eval q((($ptr)-> ($segs[$segno]->{ds_addr})));
    }' unless defined(&DMASEGADDR);
    eval 'sub DMAADDR {
        my($ptr) = @_;
	    eval q( &DMASEGADDR($ptr, 0));
    }' unless defined(&DMAADDR);
    eval 'sub DMASIZE {
        my($ptr) = @_;
	    eval q((($ptr)-> &size));
    }' unless defined(&DMASIZE);
    eval 'sub EMU_PTESIZE () {4096;}' unless defined(&EMU_PTESIZE);
    eval 'sub EMU_MAXPTE () {(( &EMU_CHAN_PSST_LOOPSTARTADDR_MASK + 1) /  &EMU_PTESIZE);}' unless defined(&EMU_MAXPTE);
    eval 'sub EMU_NUMCHAN () {64;}' unless defined(&EMU_NUMCHAN);
    eval 'sub EMU_NUMRECSRCS () {3;}' unless defined(&EMU_NUMRECSRCS);
    eval 'sub EMU_DMA_ALIGN () {4096;}' unless defined(&EMU_DMA_ALIGN);
    eval 'sub EMU_DMAMEM_NSEG () {1;}' unless defined(&EMU_DMAMEM_NSEG);
    eval 'sub EMU_RMEM () {0xffff;}' unless defined(&EMU_RMEM);
    eval("sub EMU_RECSRC_MIC () { 0; }") unless defined(&EMU_RECSRC_MIC);
    eval("sub EMU_RECSRC_ADC () { 1; }") unless defined(&EMU_RECSRC_ADC);
    eval("sub EMU_RECSRC_FX () { 2; }") unless defined(&EMU_RECSRC_FX);
    eval("sub EMU_RECSRC_NOTSET () { 3; }") unless defined(&EMU_RECSRC_NOTSET);
    eval 'sub EMU_VOICE_USE_PLAY () {(1<< 0);}' unless defined(&EMU_VOICE_USE_PLAY);
    eval 'sub EMU_VOICE_STATE_STARTED () {(1<< 0);}' unless defined(&EMU_VOICE_STATE_STARTED);
    eval 'sub EMU_VOICE_STEREO_NOTSET () {0xff;}' unless defined(&EMU_VOICE_STEREO_NOTSET);
    if(0) {
    }
    eval("sub EMUXKI_SBLIVE () { 0x00; }") unless defined(&EMUXKI_SBLIVE);
    eval("sub EMUXKI_AUDIGY () { 0x01; }") unless defined(&EMUXKI_AUDIGY);
    eval("sub EMUXKI_AUDIGY2 () { 0x02; }") unless defined(&EMUXKI_AUDIGY2);
    eval("sub EMUXKI_LIVE_5_1 () { 0x04; }") unless defined(&EMUXKI_LIVE_5_1);
    eval("sub EMUXKI_APS () { 0x08; }") unless defined(&EMUXKI_APS);
    eval 'sub EMU_TIMER_STATE_ENABLED () {1;}' unless defined(&EMU_TIMER_STATE_ENABLED);
}
1;
