require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_ISOFS_CD9660_CD9660_EXTERN_H_)) {
    eval 'sub _ISOFS_CD9660_CD9660_EXTERN_H_ () {1;}' unless defined(&_ISOFS_CD9660_CD9660_EXTERN_H_);
    eval 'sub CD9660_UTF8_JOLIET () {1;}' unless defined(&CD9660_UTF8_JOLIET);
    eval("sub ISO_FTYPE_DEFAULT () { 0; }") unless defined(&ISO_FTYPE_DEFAULT);
    eval("sub ISO_FTYPE_9660 () { 1; }") unless defined(&ISO_FTYPE_9660);
    eval("sub ISO_FTYPE_RRIP () { 2; }") unless defined(&ISO_FTYPE_RRIP);
    eval("sub ISO_FTYPE_ECMA () { 3; }") unless defined(&ISO_FTYPE_ECMA);
    unless(defined(&ISOFSMNT_ROOT)) {
	eval 'sub ISOFSMNT_ROOT () {0;}' unless defined(&ISOFSMNT_ROOT);
    }
    eval 'sub VFSTOISOFS {
        my($mp) = @_;
	    eval q(((($mp)-> &mnt_data)));
    }' unless defined(&VFSTOISOFS);
    eval 'sub cd9660_blkoff {
        my($imp, $loc) = @_;
	    eval q((($loc) & ($imp)-> &im_bmask));
    }' unless defined(&cd9660_blkoff);
    eval 'sub cd9660_lblktosize {
        my($imp, $blk) = @_;
	    eval q((($blk) << ($imp)-> &im_bshift));
    }' unless defined(&cd9660_lblktosize);
    eval 'sub cd9660_lblkno {
        my($imp, $loc) = @_;
	    eval q((($loc) >> ($imp)-> &im_bshift));
    }' unless defined(&cd9660_lblkno);
    eval 'sub cd9660_blksize {
        my($imp, $ip, $lbn) = @_;
	    eval q((($imp)-> &logical_block_size));
    }' unless defined(&cd9660_blksize);
    if(defined(&_KERNEL)) {
	require 'sys/mallocvar.ph';
    }
}
1;
