require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_RF__RF_DISKS_H_)) {
    eval 'sub _RF__RF_DISKS_H_ () {1;}' unless defined(&_RF__RF_DISKS_H_);
    require 'sys/types.ph';
    require 'rf_archs.ph';
    require 'rf_types.ph';
    if(defined( &__NetBSD__)) {
	require 'rf_netbsd.ph';
    }
 elsif(defined( &__OpenBSD__)) {
	require 'rf_openbsd.ph';
    }
    eval("sub rf_ds_optimal () { 0; }") unless defined(&rf_ds_optimal);
    eval("sub rf_ds_failed () { 1; }") unless defined(&rf_ds_failed);
    eval("sub rf_ds_reconstructing () { 2; }") unless defined(&rf_ds_reconstructing);
    eval("sub rf_ds_dist_spared () { 3; }") unless defined(&rf_ds_dist_spared);
    eval("sub rf_ds_spared () { 4; }") unless defined(&rf_ds_spared);
    eval("sub rf_ds_spare () { 5; }") unless defined(&rf_ds_spare);
    eval("sub rf_ds_used_spare () { 6; }") unless defined(&rf_ds_used_spare);
    eval 'sub RF_DEAD_DISK {
        my($_dstat_) = @_;
	    eval q(((($_dstat_) ==  &rf_ds_spared) || (($_dstat_) ==  &rf_ds_reconstructing) || (($_dstat_) ==  &rf_ds_failed) || (($_dstat_) ==  &rf_ds_dist_spared)));
    }' unless defined(&RF_DEAD_DISK);
    if(defined(&_KERNEL)) {
	if(defined( &__NetBSD__)) {
	    require 'rf_netbsd.ph';
	}
 elsif(defined( &__OpenBSD__)) {
	    require 'rf_openbsd.ph';
	}
    }
}
1;
