require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_REBOOT_H_)) {
    eval 'sub _SYS_REBOOT_H_ () {1;}' unless defined(&_SYS_REBOOT_H_);
    eval 'sub RB_AUTOBOOT () {0;}' unless defined(&RB_AUTOBOOT);
    eval 'sub RB_ASKNAME () {0x1;}' unless defined(&RB_ASKNAME);
    eval 'sub RB_SINGLE () {0x2;}' unless defined(&RB_SINGLE);
    eval 'sub RB_NOSYNC () {0x4;}' unless defined(&RB_NOSYNC);
    eval 'sub RB_HALT () {0x8;}' unless defined(&RB_HALT);
    eval 'sub RB_INITNAME () {0x10;}' unless defined(&RB_INITNAME);
    eval 'sub __RB_UNUSED1 () {0x20;}' unless defined(&__RB_UNUSED1);
    eval 'sub RB_KDB () {0x40;}' unless defined(&RB_KDB);
    eval 'sub RB_RDONLY () {0x80;}' unless defined(&RB_RDONLY);
    eval 'sub RB_DUMP () {0x100;}' unless defined(&RB_DUMP);
    eval 'sub RB_MINIROOT () {0x200;}' unless defined(&RB_MINIROOT);
    eval 'sub RB_STRING () {0x400;}' unless defined(&RB_STRING);
    eval 'sub RB_POWERDOWN () {( &RB_HALT|0x800);}' unless defined(&RB_POWERDOWN);
    eval 'sub RB_USERCONF () {0x1000;}' unless defined(&RB_USERCONF);
    eval 'sub AB_NORMAL () {0x;}' unless defined(&AB_NORMAL);
    eval 'sub AB_QUIET () {0x10000;}' unless defined(&AB_QUIET);
    eval 'sub AB_VERBOSE () {0x20000;}' unless defined(&AB_VERBOSE);
    eval 'sub AB_SILENT () {0x40000;}' unless defined(&AB_SILENT);
    eval 'sub AB_DEBUG () {0x80000;}' unless defined(&AB_DEBUG);
    eval 'sub RB_MD1 () {0x10000000;}' unless defined(&RB_MD1);
    eval 'sub RB_MD2 () {0x20000000;}' unless defined(&RB_MD2);
    eval 'sub RB_MD3 () {0x40000000;}' unless defined(&RB_MD3);
    eval 'sub RB_MD4 () {0x80000000;}' unless defined(&RB_MD4);
    eval 'sub B_ADAPTORSHIFT () {24;}' unless defined(&B_ADAPTORSHIFT);
    eval 'sub B_ADAPTORMASK () {0xf;}' unless defined(&B_ADAPTORMASK);
    eval 'sub B_ADAPTOR {
        my($val) = @_;
	    eval q(((($val) >>  &B_ADAPTORSHIFT) &  &B_ADAPTORMASK));
    }' unless defined(&B_ADAPTOR);
    eval 'sub B_CONTROLLERSHIFT () {20;}' unless defined(&B_CONTROLLERSHIFT);
    eval 'sub B_CONTROLLERMASK () {0xf;}' unless defined(&B_CONTROLLERMASK);
    eval 'sub B_CONTROLLER {
        my($val) = @_;
	    eval q(((($val)>> &B_CONTROLLERSHIFT) &  &B_CONTROLLERMASK));
    }' unless defined(&B_CONTROLLER);
    eval 'sub B_UNITSHIFT () {16;}' unless defined(&B_UNITSHIFT);
    eval 'sub B_UNITMASK () {0xf;}' unless defined(&B_UNITMASK);
    eval 'sub B_UNIT {
        my($val) = @_;
	    eval q(((($val) >>  &B_UNITSHIFT) &  &B_UNITMASK));
    }' unless defined(&B_UNIT);
    eval 'sub B_PARTITIONSHIFT () {8;}' unless defined(&B_PARTITIONSHIFT);
    eval 'sub B_PARTITIONMASK () {0xff;}' unless defined(&B_PARTITIONMASK);
    eval 'sub B_PARTITION {
        my($val) = @_;
	    eval q(((($val) >>  &B_PARTITIONSHIFT) &  &B_PARTITIONMASK));
    }' unless defined(&B_PARTITION);
    eval 'sub B_TYPESHIFT () {0;}' unless defined(&B_TYPESHIFT);
    eval 'sub B_TYPEMASK () {0xff;}' unless defined(&B_TYPEMASK);
    eval 'sub B_TYPE {
        my($val) = @_;
	    eval q(((($val) >>  &B_TYPESHIFT) &  &B_TYPEMASK));
    }' unless defined(&B_TYPE);
    eval 'sub B_MAGICMASK () {0xf0000000;}' unless defined(&B_MAGICMASK);
    eval 'sub B_DEVMAGIC () {0xa0000000;}' unless defined(&B_DEVMAGIC);
    eval 'sub MAKEBOOTDEV {
        my($type, $adaptor, $controller, $unit, $partition) = @_;
	    eval q(((($type) <<  &B_TYPESHIFT) | (($adaptor) <<  &B_ADAPTORSHIFT) | (($controller) <<  &B_CONTROLLERSHIFT) | (($unit) <<  &B_UNITSHIFT) | (($partition) <<  &B_PARTITIONSHIFT) |  &B_DEVMAGIC));
    }' unless defined(&MAKEBOOTDEV);
    if(defined(&_KERNEL)) {
    }
}
1;
