require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_UVM_UVM_PAGER_H_)) {
    eval 'sub _UVM_UVM_PAGER_H_ () {1;}' unless defined(&_UVM_UVM_PAGER_H_);
    eval 'sub PGO_CLEANIT () {0x1;}' unless defined(&PGO_CLEANIT);
    eval 'sub PGO_SYNCIO () {0x2;}' unless defined(&PGO_SYNCIO);
    eval 'sub PGO_DEACTIVATE () {0x4;}' unless defined(&PGO_DEACTIVATE);
    eval 'sub PGO_FREE () {0x8;}' unless defined(&PGO_FREE);
    eval 'sub PGO_ALLPAGES () {0x10;}' unless defined(&PGO_ALLPAGES);
    eval 'sub PGO_DOACTCLUST () {0x20;}' unless defined(&PGO_DOACTCLUST);
    eval 'sub PGO_LOCKED () {0x40;}' unless defined(&PGO_LOCKED);
    eval 'sub PGO_PDFREECLUST () {0x80;}' unless defined(&PGO_PDFREECLUST);
    eval 'sub PGO_REALLOCSWAP () {0x100;}' unless defined(&PGO_REALLOCSWAP);
    eval 'sub PGO_OVERWRITE () {0x200;}' unless defined(&PGO_OVERWRITE);
    eval 'sub PGO_WEAK () {0x400;}' unless defined(&PGO_WEAK);
    eval 'sub PGO_PASTEOF () {0x800;}' unless defined(&PGO_PASTEOF);
    eval 'sub PGO_DONTCARE () {( -1);}' unless defined(&PGO_DONTCARE);
    if(defined(&_KERNEL)) {
	if(defined(&UVM_PAGER_INLINE)) {
	    eval 'sub PAGER_INLINE () { &static  &__inline;}' unless defined(&PAGER_INLINE);
	} else {
	    eval 'sub PAGER_INLINE () {1;}' unless defined(&PAGER_INLINE);
	}
	eval 'sub UVMPAGER_MAPIN_WAITOK () {0x1;}' unless defined(&UVMPAGER_MAPIN_WAITOK);
	eval 'sub UVMPAGER_MAPIN_READ () {0x2;}' unless defined(&UVMPAGER_MAPIN_READ);
	eval 'sub UVMPAGER_MAPIN_WRITE () {0x;}' unless defined(&UVMPAGER_MAPIN_WRITE);
	eval 'sub VM_PAGER_OK () {0;}' unless defined(&VM_PAGER_OK);
	eval 'sub VM_PAGER_BAD () {1;}' unless defined(&VM_PAGER_BAD);
	eval 'sub VM_PAGER_FAIL () {2;}' unless defined(&VM_PAGER_FAIL);
	eval 'sub VM_PAGER_PEND () {3;}' unless defined(&VM_PAGER_PEND);
	eval 'sub VM_PAGER_ERROR () {4;}' unless defined(&VM_PAGER_ERROR);
	eval 'sub VM_PAGER_AGAIN () {5;}' unless defined(&VM_PAGER_AGAIN);
	eval 'sub VM_PAGER_UNLOCK () {6;}' unless defined(&VM_PAGER_UNLOCK);
	eval 'sub VM_PAGER_REFAULT () {7;}' unless defined(&VM_PAGER_REFAULT);
	unless(defined(&PAGER_MAP_SIZE)) {
	    eval 'sub PAGER_MAP_SIZE () {(16* 1024* 1024);}' unless defined(&PAGER_MAP_SIZE);
	}
    }
}
1;
