require '_h2ph_pre.ph';

unless(defined(&_DEV_PCI_PCIVAR_H_)) {
    eval 'sub _DEV_PCI_PCIVAR_H_ () {1;}' unless defined(&_DEV_PCI_PCIVAR_H_);
    require 'machine/bus.ph';
    require 'dev/pci/pcireg.ph';
    if(((defined(&__alpha__) ? &__alpha__ : 0) + (defined(&__atari__) ? &__atari__ : 0) + (defined(&__i386__) ? &__i386__ : 0) + (defined(&__arc__) ? &__arc__ : 0) + (defined(&__powerpc__) ? &__powerpc__ : 0) + (defined(&__galileo__) ? &__galileo__ : 0) + (defined(&__sparc64__) ? &__sparc64__ : 0) != 1)) {
    }
    if((defined(&__alpha__) ? &__alpha__ : 0)) {
	require 'alpha/pci/pci_machdep.ph';
    }
    if((defined(&__atari__) ? &__atari__ : 0)) {
	require 'atari/pci/pci_machdep.ph';
    }
    if((defined(&__i386__) ? &__i386__ : 0)) {
	require 'i386/pci/pci_machdep.ph';
    }
    if((defined(&__arc__) ? &__arc__ : 0)) {
	require 'arc/pci/pci_machdep.ph';
    }
    if((defined(&__powerpc__) ? &__powerpc__ : 0)) {
	require 'powerpc/pci/pci_machdep.ph';
    }
    if((defined(&__galileo__) ? &__galileo__ : 0)) {
	require 'galileo/pci/pci_machdep.ph';
    }
    if((defined(&__sparc64__) ? &__sparc64__ : 0)) {
	require 'sparc64/include/pci_machdep.ph';
    }
    eval 'sub PCI_FLAGS_IO_ENABLED () {0x01;}' unless defined(&PCI_FLAGS_IO_ENABLED);
    eval 'sub PCI_FLAGS_MEM_ENABLED () {0x02;}' unless defined(&PCI_FLAGS_MEM_ENABLED);
    eval 'sub PCI_QUIRK_MULTIFUNCTION () {0x00000001;}' unless defined(&PCI_QUIRK_MULTIFUNCTION);
    eval 'sub pcibuscf_bus () { $cf_loc[0];}' unless defined(&pcibuscf_bus);
    eval 'sub PCIBUS_UNK_BUS () {-1;}' unless defined(&PCIBUS_UNK_BUS);
    eval 'sub pcicf_dev () { $cf_loc[0];}' unless defined(&pcicf_dev);
    eval 'sub PCI_UNK_DEV () {-1;}' unless defined(&PCI_UNK_DEV);
    eval 'sub pcicf_function () { $cf_loc[1];}' unless defined(&pcicf_function);
    eval 'sub PCI_UNK_FUNCTION () {-1;}' unless defined(&PCI_UNK_FUNCTION);
}
1;
