require '_h2ph_pre.ph';

unless(defined(&_LINUX_ELEVATOR_H)) {
    eval 'sub _LINUX_ELEVATOR_H () {1;}' unless defined(&_LINUX_ELEVATOR_H);
    eval 'sub BLKELVGET () { &_IOR(0x12,106,$sizeof{ &blkelv_ioctl_arg_t});}' unless defined(&BLKELVGET);
    eval 'sub BLKELVSET () { &_IOW(0x12,107,$sizeof{ &blkelv_ioctl_arg_t});}' unless defined(&BLKELVSET);
    eval 'sub ELEVATOR_NO_MERGE () {0;}' unless defined(&ELEVATOR_NO_MERGE);
    eval 'sub ELEVATOR_FRONT_MERGE () {1;}' unless defined(&ELEVATOR_FRONT_MERGE);
    eval 'sub ELEVATOR_BACK_MERGE () {2;}' unless defined(&ELEVATOR_BACK_MERGE);
    eval 'sub IN_ORDER {
        local($s1,$s2) = @_;
	    eval q((((($s1)-> &rq_dev == ($s2)-> &rq_dev  && ($s1)-> &sector < ($s2)-> &sector)) || ($s1)-> &rq_dev < ($s2)-> &rq_dev));
    }' unless defined(&IN_ORDER);
    eval 'sub BHRQ_IN_ORDER {
        local($bh, $rq) = @_;
	    eval q((((($bh)-> &b_rdev == ($rq)-> &rq_dev  && ($bh)-> &b_rsector < ($rq)-> &sector)) || ($bh)-> &b_rdev < ($rq)-> &rq_dev));
    }' unless defined(&BHRQ_IN_ORDER);
    eval 'sub ELEVATOR_NOOP () {(( &elevator_t) { 0, 0,  &elevator_noop_merge,  &elevator_noop_merge_cleanup,  &elevator_noop_merge_req, });}' unless defined(&ELEVATOR_NOOP);
    eval 'sub ELEVATOR_LINUS () {(( &elevator_t) { 8192, 16384,  &elevator_linus_merge,  &elevator_linus_merge_cleanup,  &elevator_linus_merge_req, });}' unless defined(&ELEVATOR_LINUS);
}
1;
