require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_DEV_APM_APMBIOS_H_)) {
    eval 'sub _DEV_APM_APMBIOS_H_ () {1;}' unless defined(&_DEV_APM_APMBIOS_H_);
    eval 'sub APM_ERR_PM_DISABLED () {0x1;}' unless defined(&APM_ERR_PM_DISABLED);
    eval 'sub APM_ERR_REALALREADY () {0x2;}' unless defined(&APM_ERR_REALALREADY);
    eval 'sub APM_ERR_NOTCONN () {0x3;}' unless defined(&APM_ERR_NOTCONN);
    eval 'sub APM_ERR_16ALREADY () {0x5;}' unless defined(&APM_ERR_16ALREADY);
    eval 'sub APM_ERR_16NOTSUPP () {0x6;}' unless defined(&APM_ERR_16NOTSUPP);
    eval 'sub APM_ERR_32ALREADY () {0x7;}' unless defined(&APM_ERR_32ALREADY);
    eval 'sub APM_ERR_32NOTSUPP () {0x8;}' unless defined(&APM_ERR_32NOTSUPP);
    eval 'sub APM_ERR_UNRECOG_DEV () {0x9;}' unless defined(&APM_ERR_UNRECOG_DEV);
    eval 'sub APM_ERR_ERANGE () {0xa;}' unless defined(&APM_ERR_ERANGE);
    eval 'sub APM_ERR_NOTENGAGED () {0xb;}' unless defined(&APM_ERR_NOTENGAGED);
    eval 'sub APM_ERR_EOPNOTSUPP () {0xc;}' unless defined(&APM_ERR_EOPNOTSUPP);
    eval 'sub APM_ERR_RTIMER_DISABLED () {0xd;}' unless defined(&APM_ERR_RTIMER_DISABLED);
    eval 'sub APM_ERR_UNABLE () {0x60;}' unless defined(&APM_ERR_UNABLE);
    eval 'sub APM_ERR_NOEVENTS () {0x80;}' unless defined(&APM_ERR_NOEVENTS);
    eval 'sub APM_ERR_NOT_PRESENT () {0x86;}' unless defined(&APM_ERR_NOT_PRESENT);
    eval 'sub APM_DEV_ALLDEVS () {0x1;}' unless defined(&APM_DEV_ALLDEVS);
    eval 'sub APM_SYS_READY () {0x;}' unless defined(&APM_SYS_READY);
    eval 'sub APM_SYS_STANDBY () {0x1;}' unless defined(&APM_SYS_STANDBY);
    eval 'sub APM_SYS_SUSPEND () {0x2;}' unless defined(&APM_SYS_SUSPEND);
    eval 'sub APM_SYS_OFF () {0x3;}' unless defined(&APM_SYS_OFF);
    eval 'sub APM_LASTREQ_INPROG () {0x4;}' unless defined(&APM_LASTREQ_INPROG);
    eval 'sub APM_LASTREQ_REJECTED () {0x5;}' unless defined(&APM_LASTREQ_REJECTED);
    eval 'sub APM_AC_OFF () {0x;}' unless defined(&APM_AC_OFF);
    eval 'sub APM_AC_ON () {0x1;}' unless defined(&APM_AC_ON);
    eval 'sub APM_AC_BACKUP () {0x2;}' unless defined(&APM_AC_BACKUP);
    eval 'sub APM_AC_UNKNOWN () {0xff;}' unless defined(&APM_AC_UNKNOWN);
    eval 'sub APM_BATT_HIGH () {0x;}' unless defined(&APM_BATT_HIGH);
    eval 'sub APM_BATT_LOW () {0x1;}' unless defined(&APM_BATT_LOW);
    eval 'sub APM_BATT_CRITICAL () {0x2;}' unless defined(&APM_BATT_CRITICAL);
    eval 'sub APM_BATT_CHARGING () {0x3;}' unless defined(&APM_BATT_CHARGING);
    eval 'sub APM_BATT_ABSENT () {0x4;}' unless defined(&APM_BATT_ABSENT);
    eval 'sub APM_BATT_UNKNOWN () {0xff;}' unless defined(&APM_BATT_UNKNOWN);
    eval 'sub APM_BATT_FLAG_HIGH () {0x1;}' unless defined(&APM_BATT_FLAG_HIGH);
    eval 'sub APM_BATT_FLAG_LOW () {0x2;}' unless defined(&APM_BATT_FLAG_LOW);
    eval 'sub APM_BATT_FLAG_CRITICAL () {0x4;}' unless defined(&APM_BATT_FLAG_CRITICAL);
    eval 'sub APM_BATT_FLAG_CHARGING () {0x8;}' unless defined(&APM_BATT_FLAG_CHARGING);
    eval 'sub APM_BATT_FLAG_NOBATTERY () {0x10;}' unless defined(&APM_BATT_FLAG_NOBATTERY);
    eval 'sub APM_BATT_FLAG_NO_SYSTEM_BATTERY () {0x80;}' unless defined(&APM_BATT_FLAG_NO_SYSTEM_BATTERY);
    eval 'sub APM_BATT_FLAG_UNKNOWN () {0xff;}' unless defined(&APM_BATT_FLAG_UNKNOWN);
    eval 'sub APM_BATT_LIFE_UNKNOWN () {0xff;}' unless defined(&APM_BATT_LIFE_UNKNOWN);
    eval 'sub APM_STANDBY_REQ () {0x1;}' unless defined(&APM_STANDBY_REQ);
    eval 'sub APM_SUSPEND_REQ () {0x2;}' unless defined(&APM_SUSPEND_REQ);
    eval 'sub APM_NORMAL_RESUME () {0x3;}' unless defined(&APM_NORMAL_RESUME);
    eval 'sub APM_CRIT_RESUME () {0x4;}' unless defined(&APM_CRIT_RESUME);
    eval 'sub APM_BATTERY_LOW () {0x5;}' unless defined(&APM_BATTERY_LOW);
    eval 'sub APM_POWER_CHANGE () {0x6;}' unless defined(&APM_POWER_CHANGE);
    eval 'sub APM_UPDATE_TIME () {0x7;}' unless defined(&APM_UPDATE_TIME);
    eval 'sub APM_CRIT_SUSPEND_REQ () {0x8;}' unless defined(&APM_CRIT_SUSPEND_REQ);
    eval 'sub APM_USER_STANDBY_REQ () {0x9;}' unless defined(&APM_USER_STANDBY_REQ);
    eval 'sub APM_USER_SUSPEND_REQ () {0xa;}' unless defined(&APM_USER_SUSPEND_REQ);
    eval 'sub APM_SYS_STANDBY_RESUME () {0xb;}' unless defined(&APM_SYS_STANDBY_RESUME);
    eval 'sub APM_CAP_CHANGE () {0xc;}' unless defined(&APM_CAP_CHANGE);
    eval 'sub APM_GLOBAL_STANDBY () {0x1;}' unless defined(&APM_GLOBAL_STANDBY);
    eval 'sub APM_GLOBAL_SUSPEND () {0x2;}' unless defined(&APM_GLOBAL_SUSPEND);
    eval 'sub APM_MAJOR_VERS {
        my($info) = @_;
	    eval q(((($info)&0xff00)>>8));
    }' unless defined(&APM_MAJOR_VERS);
    eval 'sub APM_MINOR_VERS {
        my($info) = @_;
	    eval q((($info)&0xff));
    }' unless defined(&APM_MINOR_VERS);
    eval 'sub APMDEBUG_INFO () {0x1;}' unless defined(&APMDEBUG_INFO);
    eval 'sub APMDEBUG_EVENTS () {0x4;}' unless defined(&APMDEBUG_EVENTS);
    eval 'sub APMDEBUG_DEVICE () {0x20;}' unless defined(&APMDEBUG_DEVICE);
    eval 'sub APMDEBUG_ANOM () {0x40;}' unless defined(&APMDEBUG_ANOM);
}
1;
