require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&MSDOSFSROOT)) {
    sub MSDOSFSROOT () {	0;}
}
unless(defined(&CLUST_FREE)) {
    sub CLUST_FREE () {	0;}
}
unless(defined(&MSDOSFSFREE)) {
    sub MSDOSFSFREE () {	 &CLUST_FREE;}
}
unless(defined(&CLUST_FIRST)) {
    sub CLUST_FIRST () {	2;}
}
unless(defined(&CLUST_RSRVD)) {
    sub CLUST_RSRVD () {	0xfffffff6;}
}
unless(defined(&CLUST_BAD)) {
    sub CLUST_BAD () {	0xfffffff7;}
}
unless(defined(&CLUST_EOFS)) {
    sub CLUST_EOFS () {	0xfffffff8;}
}
unless(defined(&CLUST_EOFE)) {
    sub CLUST_EOFE () {	0xffffffff;}
}
unless(defined(&FAT12_MASK)) {
    sub FAT12_MASK () {	0xfff;}
}
unless(defined(&FAT16_MASK)) {
    sub FAT16_MASK () {	0xffff;}
}
unless(defined(&FAT32_MASK)) {
    sub FAT32_MASK () {	0xfffffff;}
}
unless(defined(&FAT12)) {
    sub FAT12 {
	my($pmp) = @_;
	eval q(( ($pmp->{pm_fatmask}) ==  &FAT12_MASK));
    }
}
unless(defined(&FAT16)) {
    sub FAT16 {
	my($pmp) = @_;
	eval q(( ($pmp->{pm_fatmask}) ==  &FAT16_MASK));
    }
}
unless(defined(&FAT32)) {
    sub FAT32 {
	my($pmp) = @_;
	eval q(( ($pmp->{pm_fatmask}) ==  &FAT32_MASK));
    }
}
unless(defined(&MSDOSFSEOF)) {
    sub MSDOSFSEOF {
	my($pmp, $cn) = @_;
	eval q((((($cn) | ~($pmp)-> &pm_fatmask) &  &CLUST_EOFS) ==  &CLUST_EOFS));
    }
}
if(defined(&_KERNEL)) {
    eval 'sub FAT_GET () {0x1;}' unless defined(&FAT_GET);
    eval 'sub FAT_SET () {0x2;}' unless defined(&FAT_SET);
    eval 'sub FAT_GET_AND_SET () {( &FAT_GET |  &FAT_SET);}' unless defined(&FAT_GET_AND_SET);
    eval 'sub DE_CLEAR () {1;}' unless defined(&DE_CLEAR);
}
1;
