require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_EXT2FS_DIR_H_)) {
    eval 'sub _EXT2FS_DIR_H_ () {1;}' unless defined(&_EXT2FS_DIR_H_);
    eval 'sub doff_t () { &int32_t;}' unless defined(&doff_t);
    eval 'sub EXT2FS_MAXDIRSIZE () {(0x7fffffff);}' unless defined(&EXT2FS_MAXDIRSIZE);
    eval 'sub EXT2FS_MAXNAMLEN () {255;}' unless defined(&EXT2FS_MAXNAMLEN);
    eval 'sub EXT2_FT_UNKNOWN () {0;}' unless defined(&EXT2_FT_UNKNOWN);
    eval 'sub EXT2_FT_REG_FILE () {1;}' unless defined(&EXT2_FT_REG_FILE);
    eval 'sub EXT2_FT_DIR () {2;}' unless defined(&EXT2_FT_DIR);
    eval 'sub EXT2_FT_CHRDEV () {3;}' unless defined(&EXT2_FT_CHRDEV);
    eval 'sub EXT2_FT_BLKDEV () {4;}' unless defined(&EXT2_FT_BLKDEV);
    eval 'sub EXT2_FT_FIFO () {5;}' unless defined(&EXT2_FT_FIFO);
    eval 'sub EXT2_FT_SOCK () {6;}' unless defined(&EXT2_FT_SOCK);
    eval 'sub EXT2_FT_SYMLINK () {7;}' unless defined(&EXT2_FT_SYMLINK);
    eval 'sub EXT2_FT_MAX () {8;}' unless defined(&EXT2_FT_MAX);
    eval 'sub E2IFTODT {
        my($mode) = @_;
	    eval q(((($mode) & 0170000) >> 12));
    }' unless defined(&E2IFTODT);
    eval 'sub EXT2FS_DIRSIZ {
        my($len) = @_;
	    eval q((( 8+ $len + 3) &~ 3));
    }' unless defined(&EXT2FS_DIRSIZ);
}
1;
