require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_FS_UDF_ECMA167_UDF_H_)) {
    eval 'sub _FS_UDF_ECMA167_UDF_H_ () {1;}' unless defined(&_FS_UDF_ECMA167_UDF_H_);
    eval 'sub VRS_NSR02 () {"NSR02";}' unless defined(&VRS_NSR02);
    eval 'sub VRS_NSR03 () {"NSR03";}' unless defined(&VRS_NSR03);
    eval 'sub VRS_BEA01 () {"BEA01";}' unless defined(&VRS_BEA01);
    eval 'sub VRS_TEA01 () {"TEA01";}' unless defined(&VRS_TEA01);
    eval 'sub VRS_CD001 () {"CD001";}' unless defined(&VRS_CD001);
    eval 'sub VRS_CDW02 () {"CDW02";}' unless defined(&VRS_CDW02);
    eval 'sub MAX_TAGID_VOLUMES () {9;}' unless defined(&MAX_TAGID_VOLUMES);
    eval("sub TAGID_SPARING_TABLE () { 0; }") unless defined(&TAGID_SPARING_TABLE);
    eval("sub TAGID_PRI_VOL () { 1; }") unless defined(&TAGID_PRI_VOL);
    eval("sub TAGID_ANCHOR () { 2; }") unless defined(&TAGID_ANCHOR);
    eval("sub TAGID_VOL () { 3; }") unless defined(&TAGID_VOL);
    eval("sub TAGID_IMP_VOL () { 4; }") unless defined(&TAGID_IMP_VOL);
    eval("sub TAGID_PARTITION () { 5; }") unless defined(&TAGID_PARTITION);
    eval("sub TAGID_LOGVOL () { 6; }") unless defined(&TAGID_LOGVOL);
    eval("sub TAGID_UNALLOC_SPACE () { 7; }") unless defined(&TAGID_UNALLOC_SPACE);
    eval("sub TAGID_TERM () { 8; }") unless defined(&TAGID_TERM);
    eval("sub TAGID_LOGVOL_INTEGRITY () { 9; }") unless defined(&TAGID_LOGVOL_INTEGRITY);
    eval("sub TAGID_FSD () { 256; }") unless defined(&TAGID_FSD);
    eval("sub TAGID_FID () { 257; }") unless defined(&TAGID_FID);
    eval("sub TAGID_ALLOCEXTENT () { 258; }") unless defined(&TAGID_ALLOCEXTENT);
    eval("sub TAGID_INDIRECTENTRY () { 259; }") unless defined(&TAGID_INDIRECTENTRY);
    eval("sub TAGID_ICB_TERM () { 260; }") unless defined(&TAGID_ICB_TERM);
    eval("sub TAGID_FENTRY () { 261; }") unless defined(&TAGID_FENTRY);
    eval("sub TAGID_EXTATTR_HDR () { 262; }") unless defined(&TAGID_EXTATTR_HDR);
    eval("sub TAGID_UNALL_SP_ENTRY () { 263; }") unless defined(&TAGID_UNALL_SP_ENTRY);
    eval("sub TAGID_SPACE_BITMAP () { 264; }") unless defined(&TAGID_SPACE_BITMAP);
    eval("sub TAGID_PART_INTEGRETY () { 265; }") unless defined(&TAGID_PART_INTEGRETY);
    eval("sub TAGID_EXTFENTRY () { 266; }") unless defined(&TAGID_EXTFENTRY);
    eval("sub TAGID_MAX () { 266; }") unless defined(&TAGID_MAX);
    eval("sub UDF_DOMAIN_FLAG_HARD_WRITE_PROTECT () { 1; }") unless defined(&UDF_DOMAIN_FLAG_HARD_WRITE_PROTECT);
    eval("sub UDF_DOMAIN_FLAG_SOFT_WRITE_PROTECT () { 2; }") unless defined(&UDF_DOMAIN_FLAG_SOFT_WRITE_PROTECT);
    eval("sub UDF_ACCESSTYPE_NOT_SPECIFIED () { 0; }") unless defined(&UDF_ACCESSTYPE_NOT_SPECIFIED);
    eval("sub UDF_ACCESSTYPE_PSEUDO_OVERWITE () { 0; }") unless defined(&UDF_ACCESSTYPE_PSEUDO_OVERWITE);
    eval("sub UDF_ACCESSTYPE_READ_ONLY () { 1; }") unless defined(&UDF_ACCESSTYPE_READ_ONLY);
    eval("sub UDF_ACCESSTYPE_WRITE_ONCE () { 2; }") unless defined(&UDF_ACCESSTYPE_WRITE_ONCE);
    eval("sub UDF_ACCESSTYPE_REWRITEABLE () { 3; }") unless defined(&UDF_ACCESSTYPE_REWRITEABLE);
    eval("sub UDF_ACCESSTYPE_OVERWRITABLE () { 4; }") unless defined(&UDF_ACCESSTYPE_OVERWRITABLE);
    eval 'sub UDF_DESC_TAG_LENGTH () {16;}' unless defined(&UDF_DESC_TAG_LENGTH);
    eval 'sub UDF_ADIMP_FLAGS_EXTENT_ERASED () {1;}' unless defined(&UDF_ADIMP_FLAGS_EXTENT_ERASED);
    eval 'sub longad_uniqueid () { ($impl->{im_used}->{unique_id});}' unless defined(&longad_uniqueid);
    eval 'sub UDF_EXT_ALLOCATED () {(0<<30);}' unless defined(&UDF_EXT_ALLOCATED);
    eval 'sub UDF_EXT_FREED () {(1<<30);}' unless defined(&UDF_EXT_FREED);
    eval 'sub UDF_EXT_ALLOCATED_BUT_NOT_USED () {(1<<30);}' unless defined(&UDF_EXT_ALLOCATED_BUT_NOT_USED);
    eval 'sub UDF_EXT_FREE () {(2<<30);}' unless defined(&UDF_EXT_FREE);
    eval 'sub UDF_EXT_REDIRECT () {(3<<30);}' unless defined(&UDF_EXT_REDIRECT);
    eval 'sub UDF_EXT_FLAGS {
        my($len) = @_;
	    eval q((($len) & (3<<30)));
    }' unless defined(&UDF_EXT_FLAGS);
    eval 'sub UDF_EXT_LEN {
        my($len) = @_;
	    eval q((($len) & ((1<<30)-1)));
    }' unless defined(&UDF_EXT_LEN);
    eval 'sub UDF_EXT_MAXLEN () {((1<<30)-1);}' unless defined(&UDF_EXT_MAXLEN);
    eval 'sub UDF_PATH_COMP_SIZE () {4;}' unless defined(&UDF_PATH_COMP_SIZE);
    eval 'sub UDF_PATH_COMP_RESERVED () {0;}' unless defined(&UDF_PATH_COMP_RESERVED);
    eval 'sub UDF_PATH_COMP_ROOT () {1;}' unless defined(&UDF_PATH_COMP_ROOT);
    eval 'sub UDF_PATH_COMP_MOUNTROOT () {2;}' unless defined(&UDF_PATH_COMP_MOUNTROOT);
    eval 'sub UDF_PATH_COMP_PARENTDIR () {3;}' unless defined(&UDF_PATH_COMP_PARENTDIR);
    eval 'sub UDF_PATH_COMP_CURDIR () {4;}' unless defined(&UDF_PATH_COMP_CURDIR);
    eval 'sub UDF_PATH_COMP_NAME () {5;}' unless defined(&UDF_PATH_COMP_NAME);
    eval 'sub UDF_TIMESTAMP_SIZE () {12;}' unless defined(&UDF_TIMESTAMP_SIZE);
    eval 'sub UDF_REGID_ID_SIZE () {23;}' unless defined(&UDF_REGID_ID_SIZE);
    eval 'sub UDF_ICB_TAG_FLAGS_ALLOC_MASK () {0x3;}' unless defined(&UDF_ICB_TAG_FLAGS_ALLOC_MASK);
    eval 'sub UDF_ICB_SHORT_ALLOC () {0x;}' unless defined(&UDF_ICB_SHORT_ALLOC);
    eval 'sub UDF_ICB_LONG_ALLOC () {0x1;}' unless defined(&UDF_ICB_LONG_ALLOC);
    eval 'sub UDF_ICB_EXT_ALLOC () {0x2;}' unless defined(&UDF_ICB_EXT_ALLOC);
    eval 'sub UDF_ICB_INTERN_ALLOC () {0x3;}' unless defined(&UDF_ICB_INTERN_ALLOC);
    eval 'sub UDF_ICB_TAG_FLAGS_DIRORDERED () {(1<< 3);}' unless defined(&UDF_ICB_TAG_FLAGS_DIRORDERED);
    eval 'sub UDF_ICB_TAG_FLAGS_NONRELOC () {(1<< 4);}' unless defined(&UDF_ICB_TAG_FLAGS_NONRELOC);
    eval 'sub UDF_ICB_TAG_FLAGS_CONTIGUES () {(1<< 9);}' unless defined(&UDF_ICB_TAG_FLAGS_CONTIGUES);
    eval 'sub UDF_ICB_TAG_FLAGS_MULTIPLEVERS () {(1<<12);}' unless defined(&UDF_ICB_TAG_FLAGS_MULTIPLEVERS);
    eval 'sub UDF_ICB_TAG_FLAGS_SETUID () {(1<< 6);}' unless defined(&UDF_ICB_TAG_FLAGS_SETUID);
    eval 'sub UDF_ICB_TAG_FLAGS_SETGID () {(1<< 7);}' unless defined(&UDF_ICB_TAG_FLAGS_SETGID);
    eval 'sub UDF_ICB_TAG_FLAGS_STICKY () {(1<< 8);}' unless defined(&UDF_ICB_TAG_FLAGS_STICKY);
    eval 'sub UDF_ICB_FILETYPE_UNKNOWN () {0;}' unless defined(&UDF_ICB_FILETYPE_UNKNOWN);
    eval 'sub UDF_ICB_FILETYPE_UNALLOCSPACE () {1;}' unless defined(&UDF_ICB_FILETYPE_UNALLOCSPACE);
    eval 'sub UDF_ICB_FILETYPE_PARTINTEGRITY () {2;}' unless defined(&UDF_ICB_FILETYPE_PARTINTEGRITY);
    eval 'sub UDF_ICB_FILETYPE_INDIRECTENTRY () {3;}' unless defined(&UDF_ICB_FILETYPE_INDIRECTENTRY);
    eval 'sub UDF_ICB_FILETYPE_DIRECTORY () {4;}' unless defined(&UDF_ICB_FILETYPE_DIRECTORY);
    eval 'sub UDF_ICB_FILETYPE_RANDOMACCESS () {5;}' unless defined(&UDF_ICB_FILETYPE_RANDOMACCESS);
    eval 'sub UDF_ICB_FILETYPE_BLOCKDEVICE () {6;}' unless defined(&UDF_ICB_FILETYPE_BLOCKDEVICE);
    eval 'sub UDF_ICB_FILETYPE_CHARDEVICE () {7;}' unless defined(&UDF_ICB_FILETYPE_CHARDEVICE);
    eval 'sub UDF_ICB_FILETYPE_EXTATTRREC () {8;}' unless defined(&UDF_ICB_FILETYPE_EXTATTRREC);
    eval 'sub UDF_ICB_FILETYPE_FIFO () {9;}' unless defined(&UDF_ICB_FILETYPE_FIFO);
    eval 'sub UDF_ICB_FILETYPE_SOCKET () {10;}' unless defined(&UDF_ICB_FILETYPE_SOCKET);
    eval 'sub UDF_ICB_FILETYPE_TERM () {11;}' unless defined(&UDF_ICB_FILETYPE_TERM);
    eval 'sub UDF_ICB_FILETYPE_SYMLINK () {12;}' unless defined(&UDF_ICB_FILETYPE_SYMLINK);
    eval 'sub UDF_ICB_FILETYPE_STREAMDIR () {13;}' unless defined(&UDF_ICB_FILETYPE_STREAMDIR);
    eval 'sub UDF_ICB_FILETYPE_VAT () {248;}' unless defined(&UDF_ICB_FILETYPE_VAT);
    eval 'sub UDF_ICB_FILETYPE_REALTIME () {249;}' unless defined(&UDF_ICB_FILETYPE_REALTIME);
    eval 'sub UDF_ICB_FILETYPE_META_MAIN () {250;}' unless defined(&UDF_ICB_FILETYPE_META_MAIN);
    eval 'sub UDF_ICB_FILETYPE_META_MIRROR () {251;}' unless defined(&UDF_ICB_FILETYPE_META_MIRROR);
    eval 'sub lv_fsd_loc () { ($_lvd_use->{fsd_loc});}' unless defined(&lv_fsd_loc);
    eval 'sub UDF_INTEGRITY_OPEN () {0;}' unless defined(&UDF_INTEGRITY_OPEN);
    eval 'sub UDF_INTEGRITY_CLOSED () {1;}' unless defined(&UDF_INTEGRITY_CLOSED);
    eval 'sub UDF_PMAP_SIZE () {64;}' unless defined(&UDF_PMAP_SIZE);
    eval 'sub METADATA_DUPLICATED () {1;}' unless defined(&METADATA_DUPLICATED);
    eval 'sub UDF_NO_PREV_VAT () {0xffffffff;}' unless defined(&UDF_NO_PREV_VAT);
    eval 'sub pd_part_hdr () { ($_impl_use->{part_hdr});}' unless defined(&pd_part_hdr);
    eval 'sub UDF_PART_FLAG_ALLOCATED () {1;}' unless defined(&UDF_PART_FLAG_ALLOCATED);
    eval 'sub lvint_next_unique_id () { ($_impl_use->{logvolhdr}->{next_unique_id});}' unless defined(&lvint_next_unique_id);
    eval 'sub UDF_FID_SIZE () {38;}' unless defined(&UDF_FID_SIZE);
    eval 'sub UDF_FILE_CHAR_VIS () {(1<< 0);}' unless defined(&UDF_FILE_CHAR_VIS);
    eval 'sub UDF_FILE_CHAR_DIR () {(1<< 1);}' unless defined(&UDF_FILE_CHAR_DIR);
    eval 'sub UDF_FILE_CHAR_DEL () {(1<< 2);}' unless defined(&UDF_FILE_CHAR_DEL);
    eval 'sub UDF_FILE_CHAR_PAR () {(1<< 3);}' unless defined(&UDF_FILE_CHAR_PAR);
    eval 'sub UDF_FILE_CHAR_META () {(1<< 4);}' unless defined(&UDF_FILE_CHAR_META);
    eval 'sub UDF_IMPL_ATTR_LOC_NOT_PRESENT () {0xffffffff;}' unless defined(&UDF_IMPL_ATTR_LOC_NOT_PRESENT);
    eval 'sub UDF_APPL_ATTR_LOC_NOT_PRESENT () {0xffffffff;}' unless defined(&UDF_APPL_ATTR_LOC_NOT_PRESENT);
    eval 'sub UDF_FILETIMES_ATTR_NO () {5;}' unless defined(&UDF_FILETIMES_ATTR_NO);
    eval 'sub UDF_FILETIMES_FILE_CREATION () {1;}' unless defined(&UDF_FILETIMES_FILE_CREATION);
    eval 'sub UDF_FILETIMES_FILE_DELETION () {4;}' unless defined(&UDF_FILETIMES_FILE_DELETION);
    eval 'sub UDF_FILETIMES_FILE_EFFECTIVE () {8;}' unless defined(&UDF_FILETIMES_FILE_EFFECTIVE);
    eval 'sub UDF_FILETIMES_FILE_BACKUPED () {16;}' unless defined(&UDF_FILETIMES_FILE_BACKUPED);
    eval 'sub UDF_FILETIMES_ATTR_SIZE {
        my($no) = @_;
	    eval q((20+ ($no)*$sizeof{\'struct timestamp\'}));
    }' unless defined(&UDF_FILETIMES_ATTR_SIZE);
    eval 'sub UDF_DEVICESPEC_ATTR_NO () {12;}' unless defined(&UDF_DEVICESPEC_ATTR_NO);
    eval 'sub UDF_FENTRY_SIZE () {176;}' unless defined(&UDF_FENTRY_SIZE);
    eval 'sub UDF_FENTRY_PERM_USER_MASK () {0x7;}' unless defined(&UDF_FENTRY_PERM_USER_MASK);
    eval 'sub UDF_FENTRY_PERM_GRP_MASK () {0xe0;}' unless defined(&UDF_FENTRY_PERM_GRP_MASK);
    eval 'sub UDF_FENTRY_PERM_OWNER_MASK () {0x1c00;}' unless defined(&UDF_FENTRY_PERM_OWNER_MASK);
    eval 'sub UDF_EXTFENTRY_SIZE () {216;}' unless defined(&UDF_EXTFENTRY_SIZE);
    eval 'sub GETICB {
        my($ad_type, $fentry, $offset) = @_;
	    eval q( ($fentry->{data[$offset]}));
    }' unless defined(&GETICB);
    eval 'sub GETICBLEN {
        my($ad_type, $icb) = @_;
	    eval q( &letoh32((($icb))-> &len));
    }' unless defined(&GETICBLEN);
}
1;
