require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SYS_PCIIO_H_)) {
    eval 'sub _SYS_PCIIO_H_ () {1;}' unless defined(&_SYS_PCIIO_H_);
    require 'sys/ioccom.ph';
    eval 'sub PCI_MAXNAMELEN () {16;}' unless defined(&PCI_MAXNAMELEN);
    eval("sub PCI_GETCONF_LAST_DEVICE () { 0; }") unless defined(&PCI_GETCONF_LAST_DEVICE);
    eval("sub PCI_GETCONF_LIST_CHANGED () { 1; }") unless defined(&PCI_GETCONF_LIST_CHANGED);
    eval("sub PCI_GETCONF_MORE_DEVS () { 2; }") unless defined(&PCI_GETCONF_MORE_DEVS);
    eval("sub PCI_GETCONF_ERROR () { 3; }") unless defined(&PCI_GETCONF_ERROR);
    eval("sub PCI_GETCONF_NO_MATCH () { 0x00; }") unless defined(&PCI_GETCONF_NO_MATCH);
    eval("sub PCI_GETCONF_MATCH_BUS () { 0x01; }") unless defined(&PCI_GETCONF_MATCH_BUS);
    eval("sub PCI_GETCONF_MATCH_DEV () { 0x02; }") unless defined(&PCI_GETCONF_MATCH_DEV);
    eval("sub PCI_GETCONF_MATCH_FUNC () { 0x04; }") unless defined(&PCI_GETCONF_MATCH_FUNC);
    eval("sub PCI_GETCONF_MATCH_NAME () { 0x08; }") unless defined(&PCI_GETCONF_MATCH_NAME);
    eval("sub PCI_GETCONF_MATCH_UNIT () { 0x10; }") unless defined(&PCI_GETCONF_MATCH_UNIT);
    eval("sub PCI_GETCONF_MATCH_VENDOR () { 0x20; }") unless defined(&PCI_GETCONF_MATCH_VENDOR);
    eval("sub PCI_GETCONF_MATCH_DEVICE () { 0x40; }") unless defined(&PCI_GETCONF_MATCH_DEVICE);
    eval("sub PCI_GETCONF_MATCH_CLASS () { 0x80; }") unless defined(&PCI_GETCONF_MATCH_CLASS);
    eval 'sub PCIOCGETCONF () { &_IOWR(ord(\'p\'), 1, \'struct pci_conf_io\');}' unless defined(&PCIOCGETCONF);
    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 PCIOCATTACHED () { &_IOWR(ord(\'p\'), 4, \'struct pci_io\');}' unless defined(&PCIOCATTACHED);
}
1;
