require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_MACHINE_VM_PARAM_H_)) {
    eval 'sub _MACHINE_VM_PARAM_H_ () {1;}' unless defined(&_MACHINE_VM_PARAM_H_);
    eval 'sub USRTEXT () { &PAGE_SIZE;}' unless defined(&USRTEXT);
    eval 'sub USRSTACK () { &VM_MAXUSER_ADDRESS;}' unless defined(&USRSTACK);
    eval 'sub MAXTSIZ () {(64*1024*1024);}' unless defined(&MAXTSIZ);
    unless(defined(&DFLDSIZ)) {
	eval 'sub DFLDSIZ () {(64*1024*1024);}' unless defined(&DFLDSIZ);
    }
    unless(defined(&MAXDSIZ)) {
	eval 'sub MAXDSIZ () {(1024*1024*1024);}' unless defined(&MAXDSIZ);
    }
    unless(defined(&DFLSSIZ)) {
	eval 'sub DFLSSIZ () {(4*1024*1024);}' unless defined(&DFLSSIZ);
    }
    unless(defined(&MAXSSIZ)) {
	eval 'sub MAXSSIZ () {(32*1024*1024);}' unless defined(&MAXSSIZ);
    }
    eval 'sub STACKGAP_RANDOM () {256*1024;}' unless defined(&STACKGAP_RANDOM);
    eval 'sub I386_MAX_EXE_ADDR () {0x20000000;}' unless defined(&I386_MAX_EXE_ADDR);
    unless(defined(&SHMMAXPGS)) {
	eval 'sub SHMMAXPGS () {8192;}' unless defined(&SHMMAXPGS);
    }
    eval 'sub USRIOSIZE () {300;}' unless defined(&USRIOSIZE);
    eval 'sub VM_MIN_ADDRESS () {(( &vaddr_t)0);}' unless defined(&VM_MIN_ADDRESS);
    eval 'sub VM_MAXUSER_ADDRESS () {(( &vaddr_t)(( &PDSLOT_PTE<< &PDSHIFT) -  &USPACE));}' unless defined(&VM_MAXUSER_ADDRESS);
    eval 'sub VM_MAX_ADDRESS () {(( &vaddr_t)(( &PDSLOT_PTE<< &PDSHIFT) + ( &PDSLOT_PTE<< &PGSHIFT)));}' unless defined(&VM_MAX_ADDRESS);
    eval 'sub VM_MIN_KERNEL_ADDRESS () {(( &vaddr_t) &KERNBASE);}' unless defined(&VM_MIN_KERNEL_ADDRESS);
    eval 'sub VM_MAX_KERNEL_ADDRESS () {(( &vaddr_t)( &PDSLOT_APTE<< &PDSHIFT));}' unless defined(&VM_MAX_KERNEL_ADDRESS);
    eval 'sub VM_PHYS_SIZE () {( &USRIOSIZE* &PAGE_SIZE);}' unless defined(&VM_PHYS_SIZE);
    eval 'sub VM_PHYSSEG_MAX () {4;}' unless defined(&VM_PHYSSEG_MAX);
    eval 'sub VM_PHYSSEG_STRAT () { &VM_PSTRAT_BSEARCH;}' unless defined(&VM_PHYSSEG_STRAT);
    eval 'sub VM_PHYSSEG_NOADD () {1;}' unless defined(&VM_PHYSSEG_NOADD);
    eval 'sub VM_NFREELIST () {2;}' unless defined(&VM_NFREELIST);
    eval 'sub VM_FREELIST_DEFAULT () {0;}' unless defined(&VM_FREELIST_DEFAULT);
    eval 'sub VM_FREELIST_FIRST16 () {1;}' unless defined(&VM_FREELIST_FIRST16);
    eval 'sub __HAVE_PMAP_PHYSSEG () {1;}' unless defined(&__HAVE_PMAP_PHYSSEG);
}
1;
