require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_UFS_UFS_DIRHASH_H_)) {
    eval 'sub _UFS_UFS_DIRHASH_H_ () {1;}' unless defined(&_UFS_UFS_DIRHASH_H_);
    require 'sys/rwlock.ph';
    eval 'sub DIRHASH_EMPTY () {(-1);}' unless defined(&DIRHASH_EMPTY);
    eval 'sub DIRHASH_DEL () {(-2);}' unless defined(&DIRHASH_DEL);
    eval 'sub DIRALIGN () {4;}' unless defined(&DIRALIGN);
    eval 'sub DH_NFSTATS () {( &DIRECTSIZ( &MAXNAMLEN + 1) /  &DIRALIGN);}' unless defined(&DH_NFSTATS);
    eval 'sub DH_SCOREINIT () {8;}' unless defined(&DH_SCOREINIT);
    eval 'sub DH_SCOREMAX () {64;}' unless defined(&DH_SCOREMAX);
    eval 'sub DH_BLKOFFSHIFT () {8;}' unless defined(&DH_BLKOFFSHIFT);
    eval 'sub DH_NBLKOFF () {(1<<  &DH_BLKOFFSHIFT);}' unless defined(&DH_NBLKOFF);
    eval 'sub DH_BLKOFFMASK () {( &DH_NBLKOFF - 1);}' unless defined(&DH_BLKOFFMASK);
    eval 'sub DH_ENTRY {
        my($dh, $slot) = @_;
	    eval q((($dh)-> $dh_hash[($slot) >>  &DH_BLKOFFSHIFT][($slot) &  &DH_BLKOFFMASK]));
    }' unless defined(&DH_ENTRY);
}
1;
