require '_h2ph_pre.ph';

unless(defined(&_LINUX_FDREG_H)) {
    eval 'sub _LINUX_FDREG_H () {1;}' unless defined(&_LINUX_FDREG_H);
    if(defined(&FDPATCHES)) {
	eval 'sub FD_IOPORT () { ($fdc_state[&fdc]->{address});}' unless defined(&FD_IOPORT);
	eval 'sub FD_STATUS () {(4+  &FD_IOPORT );}' unless defined(&FD_STATUS);
	eval 'sub FD_DATA () {(5+  &FD_IOPORT );}' unless defined(&FD_DATA);
	eval 'sub FD_DOR () {(2+  &FD_IOPORT );}' unless defined(&FD_DOR);
	eval 'sub FD_DIR () {(7+  &FD_IOPORT );}' unless defined(&FD_DIR);
	eval 'sub FD_DCR () {(7+  &FD_IOPORT );}' unless defined(&FD_DCR);
    } else {
	eval 'sub FD_STATUS () {0x3f4;}' unless defined(&FD_STATUS);
	eval 'sub FD_DATA () {0x3f5;}' unless defined(&FD_DATA);
	eval 'sub FD_DOR () {0x3f2;}' unless defined(&FD_DOR);
	eval 'sub FD_DIR () {0x3f7;}' unless defined(&FD_DIR);
	eval 'sub FD_DCR () {0x3f7;}' unless defined(&FD_DCR);
    }
    eval 'sub STATUS_BUSYMASK () {0xf;}' unless defined(&STATUS_BUSYMASK);
    eval 'sub STATUS_BUSY () {0x10;}' unless defined(&STATUS_BUSY);
    eval 'sub STATUS_DMA () {0x20;}' unless defined(&STATUS_DMA);
    eval 'sub STATUS_DIR () {0x40;}' unless defined(&STATUS_DIR);
    eval 'sub STATUS_READY () {0x80;}' unless defined(&STATUS_READY);
    eval 'sub ST0_DS () {0x3;}' unless defined(&ST0_DS);
    eval 'sub ST0_HA () {0x4;}' unless defined(&ST0_HA);
    eval 'sub ST0_NR () {0x8;}' unless defined(&ST0_NR);
    eval 'sub ST0_ECE () {0x10;}' unless defined(&ST0_ECE);
    eval 'sub ST0_SE () {0x20;}' unless defined(&ST0_SE);
    eval 'sub ST0_INTR () {0xc0;}' unless defined(&ST0_INTR);
    eval 'sub ST1_MAM () {0x1;}' unless defined(&ST1_MAM);
    eval 'sub ST1_WP () {0x2;}' unless defined(&ST1_WP);
    eval 'sub ST1_ND () {0x4;}' unless defined(&ST1_ND);
    eval 'sub ST1_OR () {0x10;}' unless defined(&ST1_OR);
    eval 'sub ST1_CRC () {0x20;}' unless defined(&ST1_CRC);
    eval 'sub ST1_EOC () {0x80;}' unless defined(&ST1_EOC);
    eval 'sub ST2_MAM () {0x1;}' unless defined(&ST2_MAM);
    eval 'sub ST2_BC () {0x2;}' unless defined(&ST2_BC);
    eval 'sub ST2_SNS () {0x4;}' unless defined(&ST2_SNS);
    eval 'sub ST2_SEH () {0x8;}' unless defined(&ST2_SEH);
    eval 'sub ST2_WC () {0x10;}' unless defined(&ST2_WC);
    eval 'sub ST2_CRC () {0x20;}' unless defined(&ST2_CRC);
    eval 'sub ST2_CM () {0x40;}' unless defined(&ST2_CM);
    eval 'sub ST3_HA () {0x4;}' unless defined(&ST3_HA);
    eval 'sub ST3_DS () {0x8;}' unless defined(&ST3_DS);
    eval 'sub ST3_TZ () {0x10;}' unless defined(&ST3_TZ);
    eval 'sub ST3_RY () {0x20;}' unless defined(&ST3_RY);
    eval 'sub ST3_WP () {0x40;}' unless defined(&ST3_WP);
    eval 'sub ST3_FT () {0x80;}' unless defined(&ST3_FT);
    eval 'sub FD_RECALIBRATE () {0x7;}' unless defined(&FD_RECALIBRATE);
    eval 'sub FD_SEEK () {0xf;}' unless defined(&FD_SEEK);
    eval 'sub FD_READ () {0xe6;}' unless defined(&FD_READ);
    eval 'sub FD_WRITE () {0xc5;}' unless defined(&FD_WRITE);
    eval 'sub FD_SENSEI () {0x8;}' unless defined(&FD_SENSEI);
    eval 'sub FD_SPECIFY () {0x3;}' unless defined(&FD_SPECIFY);
    eval 'sub FD_FORMAT () {0x4d;}' unless defined(&FD_FORMAT);
    eval 'sub FD_VERSION () {0x10;}' unless defined(&FD_VERSION);
    eval 'sub FD_CONFIGURE () {0x13;}' unless defined(&FD_CONFIGURE);
    eval 'sub FD_PERPENDICULAR () {0x12;}' unless defined(&FD_PERPENDICULAR);
    eval 'sub FD_GETSTATUS () {0x4;}' unless defined(&FD_GETSTATUS);
    eval 'sub FD_DUMPREGS () {0xe;}' unless defined(&FD_DUMPREGS);
    eval 'sub FD_READID () {0xea;}' unless defined(&FD_READID);
    eval 'sub FD_UNLOCK () {0x14;}' unless defined(&FD_UNLOCK);
    eval 'sub FD_LOCK () {0x94;}' unless defined(&FD_LOCK);
    eval 'sub FD_RSEEK_OUT () {0x8f;}' unless defined(&FD_RSEEK_OUT);
    eval 'sub FD_RSEEK_IN () {0xcf;}' unless defined(&FD_RSEEK_IN);
    eval 'sub FD_PARTID () {0x18;}' unless defined(&FD_PARTID);
    eval 'sub FD_SAVE () {0x2e;}' unless defined(&FD_SAVE);
    eval 'sub FD_DRIVESPEC () {0x8e;}' unless defined(&FD_DRIVESPEC);
    eval 'sub FD_RESTORE () {0x4e;}' unless defined(&FD_RESTORE);
    eval 'sub FD_POWERDOWN () {0x27;}' unless defined(&FD_POWERDOWN);
    eval 'sub FD_FORMAT_N_WRITE () {0xef;}' unless defined(&FD_FORMAT_N_WRITE);
    eval 'sub FD_OPTION () {0x33;}' unless defined(&FD_OPTION);
    eval 'sub DMA_READ () {0x46;}' unless defined(&DMA_READ);
    eval 'sub DMA_WRITE () {0x4a;}' unless defined(&DMA_WRITE);
    eval 'sub FDC_NONE () {0x;}' unless defined(&FDC_NONE);
    eval 'sub FDC_UNKNOWN () {0x10;}' unless defined(&FDC_UNKNOWN);
    eval 'sub FDC_8272A () {0x20;}' unless defined(&FDC_8272A);
    eval 'sub FDC_765ED () {0x30;}' unless defined(&FDC_765ED);
    eval 'sub FDC_82072 () {0x40;}' unless defined(&FDC_82072);
    eval 'sub FDC_82072A () {0x45;}' unless defined(&FDC_82072A);
    eval 'sub FDC_82077_ORIG () {0x51;}' unless defined(&FDC_82077_ORIG);
    eval 'sub FDC_82077 () {0x52;}' unless defined(&FDC_82077);
    eval 'sub FDC_82078_UNKN () {0x5f;}' unless defined(&FDC_82078_UNKN);
    eval 'sub FDC_82078 () {0x60;}' unless defined(&FDC_82078);
    eval 'sub FDC_82078_1 () {0x61;}' unless defined(&FDC_82078_1);
    eval 'sub FDC_S82078B () {0x62;}' unless defined(&FDC_S82078B);
    eval 'sub FDC_87306 () {0x63;}' unless defined(&FDC_87306);
    eval 'sub FD_RESET_DELAY () {20;}' unless defined(&FD_RESET_DELAY);
}
1;
