require '_h2ph_pre.ph';

unless(defined(&_LINUX_GENHD_H)) {
    eval 'sub _LINUX_GENHD_H () {1;}' unless defined(&_LINUX_GENHD_H);
    require 'linux/config.ph';
    require 'linux/types.ph';
    require 'linux/major.ph';
    eval 'sub DOS_EXTENDED_PARTITION () {5;}' unless defined(&DOS_EXTENDED_PARTITION);
    eval 'sub LINUX_EXTENDED_PARTITION () {0x85;}' unless defined(&LINUX_EXTENDED_PARTITION);
    eval 'sub WIN98_EXTENDED_PARTITION () {0xf;}' unless defined(&WIN98_EXTENDED_PARTITION);
    eval 'sub LINUX_SWAP_PARTITION () {0x82;}' unless defined(&LINUX_SWAP_PARTITION);
    eval 'sub LINUX_RAID_PARTITION () {0xfd;}' unless defined(&LINUX_RAID_PARTITION);
    if(defined(&CONFIG_SOLARIS_X86_PARTITION)) {
	eval 'sub SOLARIS_X86_PARTITION () { &LINUX_SWAP_PARTITION;}' unless defined(&SOLARIS_X86_PARTITION);
    }
    eval 'sub DM6_PARTITION () {0x54;}' unless defined(&DM6_PARTITION);
    eval 'sub EZD_PARTITION () {0x55;}' unless defined(&EZD_PARTITION);
    eval 'sub DM6_AUX1PARTITION () {0x51;}' unless defined(&DM6_AUX1PARTITION);
    eval 'sub DM6_AUX3PARTITION () {0x53;}' unless defined(&DM6_AUX3PARTITION);
    if(defined(&CONFIG_SOLARIS_X86_PARTITION)) {
	eval 'sub SOLARIS_X86_NUMSLICE () {8;}' unless defined(&SOLARIS_X86_NUMSLICE);
	eval 'sub SOLARIS_X86_VTOC_SANE () {(0x600ddeee);}' unless defined(&SOLARIS_X86_VTOC_SANE);
    }
    if(defined(&CONFIG_BSD_DISKLABEL)) {
	eval 'sub FREEBSD_PARTITION () {0xa5;}' unless defined(&FREEBSD_PARTITION);
	eval 'sub OPENBSD_PARTITION () {0xa6;}' unless defined(&OPENBSD_PARTITION);
	eval 'sub NETBSD_PARTITION () {0xa9;}' unless defined(&NETBSD_PARTITION);
	eval 'sub BSDI_PARTITION () {0xb7;}' unless defined(&BSDI_PARTITION);
	eval 'sub BSD_PARTITION () { &FREEBSD_PARTITION;}' unless defined(&BSD_PARTITION);
	eval 'sub BSD_DISKMAGIC () {(0x82564557);}' unless defined(&BSD_DISKMAGIC);
	eval 'sub BSD_MAXPARTITIONS () {8;}' unless defined(&BSD_MAXPARTITIONS);
	eval 'sub OPENBSD_MAXPARTITIONS () {16;}' unless defined(&OPENBSD_MAXPARTITIONS);
	eval 'sub BSD_FS_UNUSED () {0;}' unless defined(&BSD_FS_UNUSED);
	eval 'sub NDDATA () {5;}' unless defined(&NDDATA);
	eval 'sub NSPARE () {5;}' unless defined(&NSPARE);
    }
    if(defined(&CONFIG_UNIXWARE_DISKLABEL)) {
	eval 'sub UNIXWARE_PARTITION () {0x63;}' unless defined(&UNIXWARE_PARTITION);
	eval 'sub UNIXWARE_DISKMAGIC () {(0xca5e600d);}' unless defined(&UNIXWARE_DISKMAGIC);
	eval 'sub UNIXWARE_DISKMAGIC2 () {(0x600ddeee);}' unless defined(&UNIXWARE_DISKMAGIC2);
	eval 'sub UNIXWARE_NUMSLICE () {16;}' unless defined(&UNIXWARE_NUMSLICE);
	eval 'sub UNIXWARE_FS_UNUSED () {0;}' unless defined(&UNIXWARE_FS_UNUSED);
    }
    if(defined(&CONFIG_MINIX_SUBPARTITION)) {
	eval 'sub MINIX_PARTITION () {0x81;}' unless defined(&MINIX_PARTITION);
	eval 'sub MINIX_NR_SUBPARTITIONS () {4;}' unless defined(&MINIX_NR_SUBPARTITIONS);
    }
}
1;
