require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_UVM_UVM_AOBJ_H_)) {
    eval 'sub _UVM_UVM_AOBJ_H_ () {1;}' unless defined(&_UVM_UVM_AOBJ_H_);
    eval 'sub UAO_FLAG_KERNOBJ () {0x1;}' unless defined(&UAO_FLAG_KERNOBJ);
    eval 'sub UAO_FLAG_KERNSWAP () {0x2;}' unless defined(&UAO_FLAG_KERNSWAP);
    eval 'sub UAO_FLAG_NOSWAP () {0x8;}' unless defined(&UAO_FLAG_NOSWAP);
    if(defined(&_KERNEL)) {
	if(defined(&_KERNEL_OPT)) {
	    require './uvm/opt_vmswap.ph';
	}
	if(defined(&VMSWAP)) {
	} else {
	    eval 'sub uao_find_swslot {
	        my($obj, $off) = @_;
    		eval q(( &__USE($off), 0));
	    }' unless defined(&uao_find_swslot);
	    eval 'sub uao_dropswap {
	        my($obj, $off) = @_;
    		eval q();
	    }' unless defined(&uao_dropswap);
	    eval 'sub uao_dropswap_range {
	        my($obj, $lo, $hi) = @_;
    		eval q();
	    }' unless defined(&uao_dropswap_range);
	}
    }
}
1;
