require '_h2ph_pre.ph';

unless(defined(&__EFS_FS_H__)) {
    eval 'sub __EFS_FS_H__ () {1;}' unless defined(&__EFS_FS_H__);
    eval 'sub EFS_VERSION () {"1.0a";}' unless defined(&EFS_VERSION);
    require 'asm/uaccess.ph';
    unless(defined(&LINUX_VERSION_CODE)) {
	require 'linux/version.ph';
    }
    if((defined(&LINUX_VERSION_CODE) ? &LINUX_VERSION_CODE : 0) < 0x20200) {
	die("This\ code\ is\ only\ for\ linux\-2\.2\ and\ later\.");
    }
    eval 'sub EFS_BLOCKSIZE_BITS () {9;}' unless defined(&EFS_BLOCKSIZE_BITS);
    eval 'sub EFS_BLOCKSIZE () {(1<<  &EFS_BLOCKSIZE_BITS);}' unless defined(&EFS_BLOCKSIZE);
    require 'linux/efs_fs_i.ph';
    require 'linux/efs_dir.ph';
    unless(defined(&MIN)) {
	eval 'sub MIN {
	    local($a, $b) = @_;
    	    eval q(((($a) < ($b)) ? ($a) : ($b)));
	}' unless defined(&MIN);
    }
    unless(defined(&MAX)) {
	eval 'sub MAX {
	    local($a, $b) = @_;
    	    eval q(((($a) > ($b)) ? ($a) : ($b)));
	}' unless defined(&MAX);
    }
    if(defined(&_EFS_USE_GENERIC)) {
	eval 'sub INODE_INFO {
	    local($i) = @_;
    	    eval q( (($i)-> ($u->{generic_ip})));
	}' unless defined(&INODE_INFO);
	eval 'sub SUPER_INFO {
	    local($s) = @_;
    	    eval q( (($s)-> ($u->{generic_sbp})));
	}' unless defined(&SUPER_INFO);
    } else {
	eval 'sub INODE_INFO {
	    local($i) = @_;
    	    eval q((($i)-> ($u->{efs_i})));
	}' unless defined(&INODE_INFO);
	eval 'sub SUPER_INFO {
	    local($s) = @_;
    	    eval q((($s)-> ($u->{efs_sb})));
	}' unless defined(&SUPER_INFO);
    }
}
1;
