require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_PCIIO_H_)) {
    eval 'sub _SYS_PCIIO_H_ () {1;}' unless defined(&_SYS_PCIIO_H_);
    require 'sys/ioccom.ph';
    eval 'sub PCI_VGA_UNLOCK () {0x;}' unless defined(&PCI_VGA_UNLOCK);
    eval 'sub PCI_VGA_LOCK () {0x1;}' unless defined(&PCI_VGA_LOCK);
    eval 'sub PCI_VGA_TRYLOCK () {0x2;}' unless defined(&PCI_VGA_TRYLOCK);
    eval 'sub PCI_VGA_IO_ENABLE () {0x1;}' unless defined(&PCI_VGA_IO_ENABLE);
    eval 'sub PCI_VGA_MEM_ENABLE () {0x2;}' unless defined(&PCI_VGA_MEM_ENABLE);
    eval 'sub PCIOCREAD () { &_IOWR(ord(\'p\'), 2, \'struct pci_io\');}' unless defined(&PCIOCREAD);
    eval 'sub PCIOCWRITE () { &_IOWR(ord(\'p\'), 3, \'struct pci_io\');}' unless defined(&PCIOCWRITE);
    eval 'sub PCIOCGETROMLEN () { &_IOWR(ord(\'p\'), 4, \'struct pci_rom\');}' unless defined(&PCIOCGETROMLEN);
    eval 'sub PCIOCGETROM () { &_IOWR(ord(\'p\'), 5, \'struct pci_rom\');}' unless defined(&PCIOCGETROM);
    eval 'sub PCIOCGETVGA () { &_IOWR(ord(\'p\'), 6, \'struct pci_vga\');}' unless defined(&PCIOCGETVGA);
    eval 'sub PCIOCSETVGA () { &_IOWR(ord(\'p\'), 7, \'struct pci_vga\');}' unless defined(&PCIOCSETVGA);
    eval 'sub PCIOCREADMASK () { &_IOWR(ord(\'p\'), 8, \'struct pci_io\');}' unless defined(&PCIOCREADMASK);
}
1;
