require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_MACHINE_DISKLABEL_H_)) {
    eval 'sub _MACHINE_DISKLABEL_H_ () {1;}' unless defined(&_MACHINE_DISKLABEL_H_);
    eval 'sub LABELSECTOR () {1;}' unless defined(&LABELSECTOR);
    eval 'sub LABELOFFSET () {0;}' unless defined(&LABELOFFSET);
    eval 'sub MAXPARTITIONS () {16;}' unless defined(&MAXPARTITIONS);
    eval 'sub RAW_PART () {2;}' unless defined(&RAW_PART);
    eval 'sub DOSBBSECTOR () {0;}' unless defined(&DOSBBSECTOR);
    eval 'sub DOSPARTOFF () {446;}' unless defined(&DOSPARTOFF);
    eval 'sub DOSDISKOFF () {444;}' unless defined(&DOSDISKOFF);
    eval 'sub NDOSPART () {4;}' unless defined(&NDOSPART);
    eval 'sub DOSACTIVE () {0x80;}' unless defined(&DOSACTIVE);
    eval 'sub DOSPTYP_UNUSED () {0x;}' unless defined(&DOSPTYP_UNUSED);
    eval 'sub DOSPTYP_FAT12 () {0x1;}' unless defined(&DOSPTYP_FAT12);
    eval 'sub DOSPTYP_FAT16S () {0x4;}' unless defined(&DOSPTYP_FAT16S);
    eval 'sub DOSPTYP_EXTEND () {0x5;}' unless defined(&DOSPTYP_EXTEND);
    eval 'sub DOSPTYP_FAT16B () {0x6;}' unless defined(&DOSPTYP_FAT16B);
    eval 'sub DOSPTYP_FAT32 () {0xb;}' unless defined(&DOSPTYP_FAT32);
    eval 'sub DOSPTYP_FAT32L () {0xc;}' unless defined(&DOSPTYP_FAT32L);
    eval 'sub DOSPTYP_FAT16L () {0xe;}' unless defined(&DOSPTYP_FAT16L);
    eval 'sub DOSPTYP_EXTENDL () {0xf;}' unless defined(&DOSPTYP_EXTENDL);
    eval 'sub DOSPTYP_ONTRACK () {0x54;}' unless defined(&DOSPTYP_ONTRACK);
    eval 'sub DOSPTYP_LINUX () {0x83;}' unless defined(&DOSPTYP_LINUX);
    eval 'sub DOSPTYP_FREEBSD () {0xa5;}' unless defined(&DOSPTYP_FREEBSD);
    eval 'sub DOSPTYP_OPENBSD () {0xa6;}' unless defined(&DOSPTYP_OPENBSD);
    eval 'sub DOSPTYP_NETBSD () {0xa9;}' unless defined(&DOSPTYP_NETBSD);
    eval 'sub DOSMBR_SIGNATURE () {(0xaa55);}' unless defined(&DOSMBR_SIGNATURE);
    eval 'sub DOSMBR_SIGNATURE_OFF () {(0x1fe);}' unless defined(&DOSMBR_SIGNATURE_OFF);
    require 'sys/dkbad.ph';
    eval 'sub DKBAD {
        local($x) = @_;
	    eval q((($x)-> &bad));
    }' unless defined(&DKBAD);
    eval 'sub DPSECT {
        local($s) = @_;
	    eval q((($s) & 0x3f));
    }' unless defined(&DPSECT);
    eval 'sub DPCYL {
        local($c, $s) = @_;
	    eval q((($c) + ((($s) & 0xc0) << 2)));
    }' unless defined(&DPCYL);
    eval 'sub get_le {
        local($p) = @_;
	    eval q({  &u_int8_t * &_p = ( &u_int8_t *)$p;  &u_int32_t  &x;  &x =  $_p[0];  &x |=  $_p[1] << 8;  &x |=  $_p[2] << 16;  &x |=  $_p[3] << 24;  &x; });
    }' unless defined(&get_le);
}
1;
