require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_ENVSYS_H_)) {
    eval 'sub _SYS_ENVSYS_H_ () {1;}' unless defined(&_SYS_ENVSYS_H_);
    unless(defined(&_KERNEL)) {
	require 'stdbool.ph';
    }
    require 'sys/ioccom.ph';
    require 'sys/power.ph';
    require 'sys/queue.ph';
    eval 'sub ENVSYS_MAXSENSORS () {512;}' unless defined(&ENVSYS_MAXSENSORS);
    eval 'sub ENVSYS_DESCLEN () {32;}' unless defined(&ENVSYS_DESCLEN);
    eval("sub ENVSYS_STEMP () { 0; }") unless defined(&ENVSYS_STEMP);
    eval("sub ENVSYS_SFANRPM () { 1; }") unless defined(&ENVSYS_SFANRPM);
    eval("sub ENVSYS_SVOLTS_AC () { 2; }") unless defined(&ENVSYS_SVOLTS_AC);
    eval("sub ENVSYS_SVOLTS_DC () { 3; }") unless defined(&ENVSYS_SVOLTS_DC);
    eval("sub ENVSYS_SOHMS () { 4; }") unless defined(&ENVSYS_SOHMS);
    eval("sub ENVSYS_SWATTS () { 5; }") unless defined(&ENVSYS_SWATTS);
    eval("sub ENVSYS_SAMPS () { 6; }") unless defined(&ENVSYS_SAMPS);
    eval("sub ENVSYS_SWATTHOUR () { 7; }") unless defined(&ENVSYS_SWATTHOUR);
    eval("sub ENVSYS_SAMPHOUR () { 8; }") unless defined(&ENVSYS_SAMPHOUR);
    eval("sub ENVSYS_INDICATOR () { 9; }") unless defined(&ENVSYS_INDICATOR);
    eval("sub ENVSYS_INTEGER () { 10; }") unless defined(&ENVSYS_INTEGER);
    eval("sub ENVSYS_DRIVE () { 11; }") unless defined(&ENVSYS_DRIVE);
    eval("sub ENVSYS_BATTERY_CAPACITY () { 12; }") unless defined(&ENVSYS_BATTERY_CAPACITY);
    eval("sub ENVSYS_BATTERY_CHARGE () { 13; }") unless defined(&ENVSYS_BATTERY_CHARGE);
    eval("sub ENVSYS_SRELHUMIDITY () { 14; }") unless defined(&ENVSYS_SRELHUMIDITY);
    eval("sub ENVSYS_LUX () { 15; }") unless defined(&ENVSYS_LUX);
    eval("sub ENVSYS_PRESSURE () { 16; }") unless defined(&ENVSYS_PRESSURE);
    eval("sub ENVSYS_NSENSORS () { 17; }") unless defined(&ENVSYS_NSENSORS);
    eval("sub ENVSYS_SVALID () { 10; }") unless defined(&ENVSYS_SVALID);
    eval("sub ENVSYS_SINVALID () { 11; }") unless defined(&ENVSYS_SINVALID);
    eval("sub ENVSYS_SCRITICAL () { 12; }") unless defined(&ENVSYS_SCRITICAL);
    eval("sub ENVSYS_SCRITUNDER () { 13; }") unless defined(&ENVSYS_SCRITUNDER);
    eval("sub ENVSYS_SCRITOVER () { 14; }") unless defined(&ENVSYS_SCRITOVER);
    eval("sub ENVSYS_SWARNUNDER () { 15; }") unless defined(&ENVSYS_SWARNUNDER);
    eval("sub ENVSYS_SWARNOVER () { 16; }") unless defined(&ENVSYS_SWARNOVER);
    eval("sub ENVSYS_DRIVE_EMPTY () { 1; }") unless defined(&ENVSYS_DRIVE_EMPTY);
    eval("sub ENVSYS_DRIVE_READY () { 2; }") unless defined(&ENVSYS_DRIVE_READY);
    eval("sub ENVSYS_DRIVE_POWERUP () { 3; }") unless defined(&ENVSYS_DRIVE_POWERUP);
    eval("sub ENVSYS_DRIVE_ONLINE () { 4; }") unless defined(&ENVSYS_DRIVE_ONLINE);
    eval("sub ENVSYS_DRIVE_IDLE () { 5; }") unless defined(&ENVSYS_DRIVE_IDLE);
    eval("sub ENVSYS_DRIVE_ACTIVE () { 6; }") unless defined(&ENVSYS_DRIVE_ACTIVE);
    eval("sub ENVSYS_DRIVE_REBUILD () { 7; }") unless defined(&ENVSYS_DRIVE_REBUILD);
    eval("sub ENVSYS_DRIVE_POWERDOWN () { 8; }") unless defined(&ENVSYS_DRIVE_POWERDOWN);
    eval("sub ENVSYS_DRIVE_FAIL () { 9; }") unless defined(&ENVSYS_DRIVE_FAIL);
    eval("sub ENVSYS_DRIVE_PFAIL () { 10; }") unless defined(&ENVSYS_DRIVE_PFAIL);
    eval("sub ENVSYS_DRIVE_MIGRATING () { 11; }") unless defined(&ENVSYS_DRIVE_MIGRATING);
    eval("sub ENVSYS_DRIVE_OFFLINE () { 12; }") unless defined(&ENVSYS_DRIVE_OFFLINE);
    eval("sub ENVSYS_DRIVE_BUILD () { 13; }") unless defined(&ENVSYS_DRIVE_BUILD);
    eval("sub ENVSYS_DRIVE_CHECK () { 14; }") unless defined(&ENVSYS_DRIVE_CHECK);
    eval("sub ENVSYS_BATTERY_CAPACITY_NORMAL () { 1; }") unless defined(&ENVSYS_BATTERY_CAPACITY_NORMAL);
    eval("sub ENVSYS_BATTERY_CAPACITY_WARNING () { 2; }") unless defined(&ENVSYS_BATTERY_CAPACITY_WARNING);
    eval("sub ENVSYS_BATTERY_CAPACITY_CRITICAL () { 3; }") unless defined(&ENVSYS_BATTERY_CAPACITY_CRITICAL);
    eval("sub ENVSYS_BATTERY_CAPACITY_HIGH () { 4; }") unless defined(&ENVSYS_BATTERY_CAPACITY_HIGH);
    eval("sub ENVSYS_BATTERY_CAPACITY_MAX () { 5; }") unless defined(&ENVSYS_BATTERY_CAPACITY_MAX);
    eval("sub ENVSYS_BATTERY_CAPACITY_LOW () { 6; }") unless defined(&ENVSYS_BATTERY_CAPACITY_LOW);
    eval("sub ENVSYS_INDICATOR_FALSE () { 0; }") unless defined(&ENVSYS_INDICATOR_FALSE);
    eval("sub ENVSYS_INDICATOR_TRUE () { 1; }") unless defined(&ENVSYS_INDICATOR_TRUE);
    eval 'sub ENVSYS_GETDICTIONARY () { &_IOWR(ord(\'E\'), 0, \'struct plistref\');}' unless defined(&ENVSYS_GETDICTIONARY);
    eval 'sub ENVSYS_SETDICTIONARY () { &_IOWR(ord(\'E\'), 1, \'struct plistref\');}' unless defined(&ENVSYS_SETDICTIONARY);
    eval 'sub ENVSYS_REMOVEPROPS () { &_IOWR(ord(\'E\'), 2, \'struct plistref\');}' unless defined(&ENVSYS_REMOVEPROPS);
    eval 'sub ENVSYS_WARN_OK () {0x;}' unless defined(&ENVSYS_WARN_OK);
    eval 'sub ENVSYS_WARN_UNDER () {0x1;}' unless defined(&ENVSYS_WARN_UNDER);
    eval 'sub ENVSYS_WARN_CRITUNDER () {0x2;}' unless defined(&ENVSYS_WARN_CRITUNDER);
    eval 'sub ENVSYS_WARN_OVER () {0x4;}' unless defined(&ENVSYS_WARN_OVER);
    eval 'sub ENVSYS_WARN_CRITOVER () {0x8;}' unless defined(&ENVSYS_WARN_CRITOVER);
    eval 'sub ENVSYS_DRIVE_EMPTY () {1;}' unless defined(&ENVSYS_DRIVE_EMPTY);
    eval 'sub ENVSYS_DRIVE_READY () {2;}' unless defined(&ENVSYS_DRIVE_READY);
    eval 'sub ENVSYS_DRIVE_POWERUP () {3;}' unless defined(&ENVSYS_DRIVE_POWERUP);
    eval 'sub ENVSYS_DRIVE_ONLINE () {4;}' unless defined(&ENVSYS_DRIVE_ONLINE);
    eval 'sub ENVSYS_DRIVE_IDLE () {5;}' unless defined(&ENVSYS_DRIVE_IDLE);
    eval 'sub ENVSYS_DRIVE_ACTIVE () {6;}' unless defined(&ENVSYS_DRIVE_ACTIVE);
    eval 'sub ENVSYS_DRIVE_REBUILD () {7;}' unless defined(&ENVSYS_DRIVE_REBUILD);
    eval 'sub ENVSYS_DRIVE_POWERDOWN () {8;}' unless defined(&ENVSYS_DRIVE_POWERDOWN);
    eval 'sub ENVSYS_DRIVE_FAIL () {9;}' unless defined(&ENVSYS_DRIVE_FAIL);
    eval 'sub ENVSYS_DRIVE_PFAIL () {10;}' unless defined(&ENVSYS_DRIVE_PFAIL);
    if(defined(&ENVSYSUNITNAMES)) {
    }
    eval 'sub ENVSYS_FVALID () {0x1;}' unless defined(&ENVSYS_FVALID);
    eval 'sub ENVSYS_FCURVALID () {0x2;}' unless defined(&ENVSYS_FCURVALID);
    eval 'sub ENVSYS_FMINVALID () {0x4;}' unless defined(&ENVSYS_FMINVALID);
    eval 'sub ENVSYS_FMAXVALID () {0x8;}' unless defined(&ENVSYS_FMAXVALID);
    eval 'sub ENVSYS_FAVGVALID () {0x10;}' unless defined(&ENVSYS_FAVGVALID);
    eval 'sub ENVSYS_FFRACVALID () {0x20;}' unless defined(&ENVSYS_FFRACVALID);
    eval 'sub ENVSYS_GTREDATA () { &_IOWR(ord(\'E\'), 2,  &envsys_tre_data_t);}' unless defined(&ENVSYS_GTREDATA);
    eval 'sub ENVSYS_GTREINFO () { &_IOWR(ord(\'E\'), 4,  &envsys_basic_info_t);}' unless defined(&ENVSYS_GTREINFO);
}
1;
