require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_UFS_UFS_EXTATTR_H_)) {
    eval 'sub _UFS_UFS_EXTATTR_H_ () {1;}' unless defined(&_UFS_UFS_EXTATTR_H_);
    eval 'sub UFS_EXTATTR_MAGIC () {0xb5d5ec;}' unless defined(&UFS_EXTATTR_MAGIC);
    eval 'sub UFS_EXTATTR_VERSION () {0x3;}' unless defined(&UFS_EXTATTR_VERSION);
    eval 'sub UFS_EXTATTR_FSROOTSUBDIR () {".attribute";}' unless defined(&UFS_EXTATTR_FSROOTSUBDIR);
    eval 'sub UFS_EXTATTR_SUBDIR_SYSTEM () {"system";}' unless defined(&UFS_EXTATTR_SUBDIR_SYSTEM);
    eval 'sub UFS_EXTATTR_SUBDIR_USER () {"user";}' unless defined(&UFS_EXTATTR_SUBDIR_USER);
    eval 'sub UFS_EXTATTR_MAXEXTATTRNAME () {256;}' unless defined(&UFS_EXTATTR_MAXEXTATTRNAME);
    eval 'sub UFS_EXTATTR_ATTR_FLAG_INUSE () {0x1;}' unless defined(&UFS_EXTATTR_ATTR_FLAG_INUSE);
    eval 'sub UFS_EXTATTR_PERM_KERNEL () {0x;}' unless defined(&UFS_EXTATTR_PERM_KERNEL);
    eval 'sub UFS_EXTATTR_PERM_ROOT () {0x1;}' unless defined(&UFS_EXTATTR_PERM_ROOT);
    eval 'sub UFS_EXTATTR_PERM_OWNER () {0x2;}' unless defined(&UFS_EXTATTR_PERM_OWNER);
    eval 'sub UFS_EXTATTR_PERM_ANYONE () {0x3;}' unless defined(&UFS_EXTATTR_PERM_ANYONE);
    eval 'sub UFS_EXTATTR_UEPM_INITIALIZED () {0x1;}' unless defined(&UFS_EXTATTR_UEPM_INITIALIZED);
    eval 'sub UFS_EXTATTR_UEPM_STARTED () {0x2;}' unless defined(&UFS_EXTATTR_UEPM_STARTED);
    eval 'sub UFS_EXTATTR_CMD_START () { &EXTATTR_CMD_START;}' unless defined(&UFS_EXTATTR_CMD_START);
    eval 'sub UFS_EXTATTR_CMD_STOP () { &EXTATTR_CMD_STOP;}' unless defined(&UFS_EXTATTR_CMD_STOP);
    eval 'sub UFS_EXTATTR_CMD_ENABLE () {0x3;}' unless defined(&UFS_EXTATTR_CMD_ENABLE);
    eval 'sub UFS_EXTATTR_CMD_DISABLE () {0x4;}' unless defined(&UFS_EXTATTR_CMD_DISABLE);
    eval 'sub EXTATTR_NEXT {
        my($eap) = @_;
	    eval q((((($eap)) + ($eap)-> &ea_length)));
    }' unless defined(&EXTATTR_NEXT);
    eval 'sub EXTATTR_CONTENT {
        my($eap) = @_;
	    eval q(( &void *)((($eap)) +  &EXTATTR_BASE_LENGTH($eap)));
    }' unless defined(&EXTATTR_CONTENT);
    eval 'sub EXTATTR_CONTENT_SIZE {
        my($eap) = @_;
	    eval q((($eap)-> &ea_length -  &EXTATTR_BASE_LENGTH($eap) - ($eap)-> &ea_contentpadlen));
    }' unless defined(&EXTATTR_CONTENT_SIZE);
    eval 'sub EXTATTR_BASE_LENGTH {
        my($eap) = @_;
	    eval q( &roundup2(($sizeof{\'struct extattr\'} - 1+ ($eap)-> &ea_namelength), 8));
    }' unless defined(&EXTATTR_BASE_LENGTH);
    if(defined(&_KERNEL)) {
	if(defined(&MALLOC_DECLARE)) {
	}
	eval 'sub UELE_F_NEEDSWAP () {0x1;}' unless defined(&UELE_F_NEEDSWAP);
	eval 'sub UELE_NEEDSWAP {
	    my($uele) = @_;
    	    eval q((($uele)-> &uele_flags &  &UELE_F_NEEDSWAP));
	}' unless defined(&UELE_NEEDSWAP);
    }
}
1;
