require '_h2ph_pre.ph';

unless(defined(&_LINUX_ACPI_H)) {
    eval 'sub _LINUX_ACPI_H () {1;}' unless defined(&_LINUX_ACPI_H);
    require 'linux/types.ph';
    require 'linux/ioctl.ph';
    eval("sub ACPI_D0 () { 0; }") unless defined(&ACPI_D0);
    eval("sub ACPI_D1 () { 1; }") unless defined(&ACPI_D1);
    eval("sub ACPI_D2 () { 2; }") unless defined(&ACPI_D2);
    eval("sub ACPI_D3 () { 3; }") unless defined(&ACPI_D3);
    eval 'sub ACPI_BIOS_ROM_BASE () {(0xe0000);}' unless defined(&ACPI_BIOS_ROM_BASE);
    eval 'sub ACPI_BIOS_ROM_END () {(0x100000);}' unless defined(&ACPI_BIOS_ROM_END);
    eval 'sub ACPI_RSDP1_SIG () {0x20445352;}' unless defined(&ACPI_RSDP1_SIG);
    eval 'sub ACPI_RSDP2_SIG () {0x20525450;}' unless defined(&ACPI_RSDP2_SIG);
    eval 'sub ACPI_RSDT_SIG () {0x54445352;}' unless defined(&ACPI_RSDT_SIG);
    eval 'sub ACPI_FADT_SIG () {0x50434146;}' unless defined(&ACPI_FADT_SIG);
    eval 'sub ACPI_DSDT_SIG () {0x54445344;}' unless defined(&ACPI_DSDT_SIG);
    eval 'sub ACPI_FACS_SIG () {0x53434146;}' unless defined(&ACPI_FACS_SIG);
    eval 'sub ACPI_SIG_LEN () {4;}' unless defined(&ACPI_SIG_LEN);
    eval 'sub ACPI_FADT_SIGNATURE () {"FACP";}' unless defined(&ACPI_FADT_SIGNATURE);
    eval 'sub ACPI_TMR () {0x1;}' unless defined(&ACPI_TMR);
    eval 'sub ACPI_BM () {0x10;}' unless defined(&ACPI_BM);
    eval 'sub ACPI_GBL () {0x20;}' unless defined(&ACPI_GBL);
    eval 'sub ACPI_PWRBTN () {0x100;}' unless defined(&ACPI_PWRBTN);
    eval 'sub ACPI_SLPBTN () {0x200;}' unless defined(&ACPI_SLPBTN);
    eval 'sub ACPI_RTC () {0x400;}' unless defined(&ACPI_RTC);
    eval 'sub ACPI_WAK () {0x8000;}' unless defined(&ACPI_WAK);
    eval 'sub ACPI_SCI_EN () {0x1;}' unless defined(&ACPI_SCI_EN);
    eval 'sub ACPI_BM_RLD () {0x2;}' unless defined(&ACPI_BM_RLD);
    eval 'sub ACPI_GBL_RLS () {0x4;}' unless defined(&ACPI_GBL_RLS);
    eval 'sub ACPI_SLP_TYP0 () {0x400;}' unless defined(&ACPI_SLP_TYP0);
    eval 'sub ACPI_SLP_TYP1 () {0x800;}' unless defined(&ACPI_SLP_TYP1);
    eval 'sub ACPI_SLP_TYP2 () {0x1000;}' unless defined(&ACPI_SLP_TYP2);
    eval 'sub ACPI_SLP_EN () {0x2000;}' unless defined(&ACPI_SLP_EN);
    eval 'sub ACPI_SLP_TYP_MASK () {0x1c00;}' unless defined(&ACPI_SLP_TYP_MASK);
    eval 'sub ACPI_SLP_TYP_SHIFT () {10;}' unless defined(&ACPI_SLP_TYP_SHIFT);
    eval 'sub ACPI_TMR_VAL_EXT () {0x100;}' unless defined(&ACPI_TMR_VAL_EXT);
    eval 'sub ACPI_TMR_MASK () {0xffffff;}' unless defined(&ACPI_TMR_MASK);
    eval 'sub ACPI_TMR_HZ () {3579545;}' unless defined(&ACPI_TMR_HZ);
    eval 'sub ACPI_TMR_KHZ () {( &ACPI_TMR_HZ / 1000);}' unless defined(&ACPI_TMR_KHZ);
    eval 'sub ACPI_MICROSEC_TO_TMR_TICKS {
        local($val) = @_;
	    eval q(((($val) * ( &ACPI_TMR_KHZ)) / 1000));
    }' unless defined(&ACPI_MICROSEC_TO_TMR_TICKS);
    eval 'sub ACPI_ARB_DIS () {0x1;}' unless defined(&ACPI_ARB_DIS);
    eval 'sub ACPI_WBINVD () {0x1;}' unless defined(&ACPI_WBINVD);
    eval 'sub ACPI_WBINVD_FLUSH () {0x2;}' unless defined(&ACPI_WBINVD_FLUSH);
    eval 'sub ACPI_PROC_C1 () {0x4;}' unless defined(&ACPI_PROC_C1);
    eval 'sub ACPI_P_LVL2_UP () {0x8;}' unless defined(&ACPI_P_LVL2_UP);
    eval 'sub ACPI_PWR_BUTTON () {0x10;}' unless defined(&ACPI_PWR_BUTTON);
    eval 'sub ACPI_SLP_BUTTON () {0x20;}' unless defined(&ACPI_SLP_BUTTON);
    eval 'sub ACPI_FIX_RTC () {0x40;}' unless defined(&ACPI_FIX_RTC);
    eval 'sub ACPI_RTC_64 () {0x80;}' unless defined(&ACPI_RTC_64);
    eval 'sub ACPI_TMR_VAL_EXT () {0x100;}' unless defined(&ACPI_TMR_VAL_EXT);
    eval 'sub ACPI_DCK_CAP () {0x200;}' unless defined(&ACPI_DCK_CAP);
    eval 'sub FADT_BOOT_ARCH_LEGACY_DEVICES () {0x1;}' unless defined(&FADT_BOOT_ARCH_LEGACY_DEVICES);
    eval 'sub FADT_BOOT_ARCH_KBD_CONTROLLER () {0x2;}' unless defined(&FADT_BOOT_ARCH_KBD_CONTROLLER);
    eval 'sub ACPI_S4BIOS () {0x1;}' unless defined(&ACPI_S4BIOS);
    eval 'sub ACPI_P_CNT () {0x;}' unless defined(&ACPI_P_CNT);
    eval 'sub ACPI_P_LVL2 () {0x4;}' unless defined(&ACPI_P_LVL2);
    eval 'sub ACPI_P_LVL3 () {0x5;}' unless defined(&ACPI_P_LVL3);
    eval 'sub ACPI_MAX_P_LVL2_LAT () {100;}' unless defined(&ACPI_MAX_P_LVL2_LAT);
    eval 'sub ACPI_MAX_P_LVL3_LAT () {1000;}' unless defined(&ACPI_MAX_P_LVL3_LAT);
    eval 'sub ACPI_INFINITE_LAT () {(~0);}' unless defined(&ACPI_INFINITE_LAT);
    eval("sub CTL_ACPI () { 10; }") unless defined(&CTL_ACPI);
    eval("sub ACPI_FADT () { 1; }") unless defined(&ACPI_FADT);
    eval("sub ACPI_DSDT () { 2; }") unless defined(&ACPI_DSDT);
    eval("sub ACPI_PM1_ENABLE () { 3; }") unless defined(&ACPI_PM1_ENABLE);
    eval("sub ACPI_GPE_ENABLE () { 4; }") unless defined(&ACPI_GPE_ENABLE);
    eval("sub ACPI_GPE_LEVEL () { 5; }") unless defined(&ACPI_GPE_LEVEL);
    eval("sub ACPI_EVENT () { 6; }") unless defined(&ACPI_EVENT);
    eval("sub ACPI_P_BLK () { 7; }") unless defined(&ACPI_P_BLK);
    eval("sub ACPI_ENTER_LVL2_LAT () { 8; }") unless defined(&ACPI_ENTER_LVL2_LAT);
    eval("sub ACPI_ENTER_LVL3_LAT () { 9; }") unless defined(&ACPI_ENTER_LVL3_LAT);
    eval("sub ACPI_P_LVL2_LAT () { 10; }") unless defined(&ACPI_P_LVL2_LAT);
    eval("sub ACPI_P_LVL3_LAT () { 11; }") unless defined(&ACPI_P_LVL3_LAT);
    eval("sub ACPI_C1_TIME () { 12; }") unless defined(&ACPI_C1_TIME);
    eval("sub ACPI_C2_TIME () { 13; }") unless defined(&ACPI_C2_TIME);
    eval("sub ACPI_C3_TIME () { 14; }") unless defined(&ACPI_C3_TIME);
    eval("sub ACPI_C1_COUNT () { 15; }") unless defined(&ACPI_C1_COUNT);
    eval("sub ACPI_C2_COUNT () { 16; }") unless defined(&ACPI_C2_COUNT);
    eval("sub ACPI_C3_COUNT () { 17; }") unless defined(&ACPI_C3_COUNT);
    eval("sub ACPI_S0_SLP_TYP () { 18; }") unless defined(&ACPI_S0_SLP_TYP);
    eval("sub ACPI_S1_SLP_TYP () { 19; }") unless defined(&ACPI_S1_SLP_TYP);
    eval("sub ACPI_S5_SLP_TYP () { 20; }") unless defined(&ACPI_S5_SLP_TYP);
    eval("sub ACPI_SLEEP () { 21; }") unless defined(&ACPI_SLEEP);
    eval("sub ACPI_FACS () { 22; }") unless defined(&ACPI_FACS);
    eval("sub ACPI_XSDT () { 23; }") unless defined(&ACPI_XSDT);
    eval("sub ACPI_PMTIMER () { 24; }") unless defined(&ACPI_PMTIMER);
    eval("sub ACPI_BATT () { 25; }") unless defined(&ACPI_BATT);
    eval 'sub ACPI_SLP_TYP_DISABLED () {(~0);}' unless defined(&ACPI_SLP_TYP_DISABLED);
}
1;
