require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_FS_EFS_EFS_H_)) {
    eval 'sub _FS_EFS_EFS_H_ () {1;}' unless defined(&_FS_EFS_EFS_H_);
    eval 'sub EFS_DEBUG () {1;}' unless defined(&EFS_DEBUG);
    eval 'sub EFS_BB_SHFT () {9;}' unless defined(&EFS_BB_SHFT);
    eval 'sub EFS_BB_SIZE () {(1<<  &EFS_BB_SHFT);}' unless defined(&EFS_BB_SIZE);
    eval 'sub EFS_BB_UNUSED () {0;}' unless defined(&EFS_BB_UNUSED);
    eval 'sub EFS_BB_SB () {1;}' unless defined(&EFS_BB_SB);
    eval 'sub EFS_BB_BITMAP () {2;}' unless defined(&EFS_BB_BITMAP);
    eval 'sub EFS_BB2BY {
        my($_x) = @_;
	    eval q((($_x) <<  &EFS_BB_SHFT));
    }' unless defined(&EFS_BB2BY);
    eval 'sub EFS_BY2BB {
        my($_x) = @_;
	    eval q(((($_x) +  &EFS_BB_SIZE - 1) >>  &EFS_BB_SHFT));
    }' unless defined(&EFS_BY2BB);
    eval 'sub EFS_SIZE_MAX () {0x1000000;}' unless defined(&EFS_SIZE_MAX);
    if(defined(&_KERNEL)) {
	eval 'sub VFSTOEFS {
	    my($mp) = @_;
    	    eval q((($mp)-> &mnt_data));
	}' unless defined(&VFSTOEFS);
	if(defined(&DEBUG)) {
	    eval 'sub EFS_DEBUG () {1;}' unless defined(&EFS_DEBUG);
	}
	if(defined(&EFS_DEBUG)) {
	    eval 'sub EFS_DPRINTF {
	        my($_x) = @_;
    		eval q( &printf $_x);
	    }' unless defined(&EFS_DPRINTF);
	} else {
	    eval 'sub EFS_DPRINTF {
	        my($_x) = @_;
    		eval q();
	    }' unless defined(&EFS_DPRINTF);
	}
    }
}
1;
