require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SPARC64_APMVAR_H_)) {
    eval 'sub _SPARC64_APMVAR_H_ () {1;}' unless defined(&_SPARC64_APMVAR_H_);
    require 'sys/ioccom.ph';
    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_UNKNOWN () {0xff;}' unless defined(&APM_BATT_UNKNOWN);
    eval 'sub APM_BATT_LIFE_UNKNOWN () {0xff;}' unless defined(&APM_BATT_LIFE_UNKNOWN);
    eval 'sub APM_NOEVENT () {0x;}' unless defined(&APM_NOEVENT);
    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_CAPABILITY_CHANGE () {0xc;}' unless defined(&APM_CAPABILITY_CHANGE);
    eval 'sub APM_EVENT_MASK () {0xffff;}' unless defined(&APM_EVENT_MASK);
    eval 'sub APM_EVENT_COMPOSE {
        my($t,$i) = @_;
	    eval q((((($i) & 0x7fff) << 16)|(($t) &  &APM_EVENT_MASK)));
    }' unless defined(&APM_EVENT_COMPOSE);
    eval 'sub APM_EVENT_TYPE {
        my($e) = @_;
	    eval q((($e) &  &APM_EVENT_MASK));
    }' unless defined(&APM_EVENT_TYPE);
    eval 'sub APM_EVENT_INDEX {
        my($e) = @_;
	    eval q((($e) >> 16));
    }' unless defined(&APM_EVENT_INDEX);
    eval 'sub APM_BATTERY_ABSENT () {4;}' unless defined(&APM_BATTERY_ABSENT);
    eval 'sub APM_IOC_REJECT () { &_IOW(ord(\'A\'), 0, \'struct apm_event_info\');}' unless defined(&APM_IOC_REJECT);
    eval 'sub APM_IOC_STANDBY () { &_IO(ord(\'A\'), 1);}' unless defined(&APM_IOC_STANDBY);
    eval 'sub APM_IOC_SUSPEND () { &_IO(ord(\'A\'), 2);}' unless defined(&APM_IOC_SUSPEND);
    eval 'sub APM_IOC_GETPOWER () { &_IOR(ord(\'A\'), 3, \'struct apm_power_info\');}' unless defined(&APM_IOC_GETPOWER);
    eval 'sub APM_IOC_DEV_CTL () { &_IOW(ord(\'A\'), 5, \'struct apm_ctl\');}' unless defined(&APM_IOC_DEV_CTL);
    eval 'sub APM_IOC_PRN_CTL () { &_IOW(ord(\'A\'), 6, \'int\' );}' unless defined(&APM_IOC_PRN_CTL);
    eval 'sub APM_PRINT_ON () {0;}' unless defined(&APM_PRINT_ON);
    eval 'sub APM_PRINT_OFF () {1;}' unless defined(&APM_PRINT_OFF);
    eval 'sub APM_PRINT_PCT () {2;}' unless defined(&APM_PRINT_PCT);
    eval 'sub APM_IOC_STANDBY_REQ () { &_IO(ord(\'A\'), 7);}' unless defined(&APM_IOC_STANDBY_REQ);
    eval 'sub APM_IOC_SUSPEND_REQ () { &_IO(ord(\'A\'), 8);}' unless defined(&APM_IOC_SUSPEND_REQ);
}
1;
