require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_UFS_DINODE_H_)) {
    eval 'sub _UFS_DINODE_H_ () {1;}' unless defined(&_UFS_DINODE_H_);
    eval 'sub ROOTINO () {(( &ino_t)2);}' unless defined(&ROOTINO);
    eval 'sub NXADDR () {2;}' unless defined(&NXADDR);
    eval 'sub NDADDR () {12;}' unless defined(&NDADDR);
    eval 'sub NIADDR () {3;}' unless defined(&NIADDR);
    eval 'sub di_inumber () { ($di_u->{inumber});}' unless defined(&di_inumber);
    eval 'sub di_ogid () { ($di_u->{oldids[1]});}' unless defined(&di_ogid);
    eval 'sub di_ouid () { ($di_u->{oldids[0]});}' unless defined(&di_ouid);
    eval 'sub di_rdev () { $di_db[0];}' unless defined(&di_rdev);
    eval 'sub di_shortlink () { &di_db;}' unless defined(&di_shortlink);
    eval 'sub MAXSYMLINKLEN_UFS1 () {(( &NDADDR +  &NIADDR) * $sizeof{ &ufs1_daddr_t});}' unless defined(&MAXSYMLINKLEN_UFS1);
    eval 'sub MAXSYMLINKLEN_UFS2 () {(( &NDADDR +  &NIADDR) * $sizeof{ &ufs2_daddr_t});}' unless defined(&MAXSYMLINKLEN_UFS2);
    eval 'sub MAXSYMLINKLEN {
        my($ip) = @_;
	    eval q((($ip)-> ($i_ump->{um_fstype}) ==  &UM_UFS1) ?  &MAXSYMLINKLEN_UFS1 :  &MAXSYMLINKLEN_UFS2);
    }' unless defined(&MAXSYMLINKLEN);
    eval 'sub IEXEC () {0000100;}' unless defined(&IEXEC);
    eval 'sub IWRITE () {0000200;}' unless defined(&IWRITE);
    eval 'sub IREAD () {0000400;}' unless defined(&IREAD);
    eval 'sub ISVTX () {0001000;}' unless defined(&ISVTX);
    eval 'sub ISGID () {0002000;}' unless defined(&ISGID);
    eval 'sub ISUID () {0004000;}' unless defined(&ISUID);
    eval 'sub IFMT () {0170000;}' unless defined(&IFMT);
    eval 'sub IFIFO () {0010000;}' unless defined(&IFIFO);
    eval 'sub IFCHR () {0020000;}' unless defined(&IFCHR);
    eval 'sub IFDIR () {0040000;}' unless defined(&IFDIR);
    eval 'sub IFBLK () {0060000;}' unless defined(&IFBLK);
    eval 'sub IFREG () {0100000;}' unless defined(&IFREG);
    eval 'sub IFLNK () {0120000;}' unless defined(&IFLNK);
    eval 'sub IFSOCK () {0140000;}' unless defined(&IFSOCK);
    eval 'sub IFWHT () {0160000;}' unless defined(&IFWHT);
}
1;
