require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_SCSI_SCSI_DEBUG_H)) {
    eval 'sub _SCSI_SCSI_DEBUG_H () {1;}' unless defined(&_SCSI_SCSI_DEBUG_H);
    eval 'sub SDEV_DB1 () {0x10;}' unless defined(&SDEV_DB1);
    eval 'sub SDEV_DB2 () {0x20;}' unless defined(&SDEV_DB2);
    eval 'sub SDEV_DB3 () {0x40;}' unless defined(&SDEV_DB3);
    eval 'sub SDEV_DB4 () {0x80;}' unless defined(&SDEV_DB4);
    unless(defined(&SCSIDEBUG_BUSES)) {
	eval 'sub SCSIDEBUG_BUSES () {0;}' unless defined(&SCSIDEBUG_BUSES);
    }
    unless(defined(&SCSIDEBUG_TARGETS)) {
	eval 'sub SCSIDEBUG_TARGETS () {0;}' unless defined(&SCSIDEBUG_TARGETS);
    }
    unless(defined(&SCSIDEBUG_LUNS)) {
	eval 'sub SCSIDEBUG_LUNS () {0;}' unless defined(&SCSIDEBUG_LUNS);
    }
    unless(defined(&SCSIDEBUG_LEVEL)) {
	eval 'sub SCSIDEBUG_LEVEL () {( &SDEV_DB1| &SDEV_DB2);}' unless defined(&SCSIDEBUG_LEVEL);
    }
    if(defined(&SCSIDEBUG)) {
	eval 'sub SC_DEBUG {
	    my($sc_link,$Level,$Printstuff) = @_;
    	    eval q( &if (($sc_link)-> &flags & ($Level)) {  &sc_print_addr($sc_link);  &printf $Printstuff; });
	}' unless defined(&SC_DEBUG);
	eval 'sub SC_DEBUGN {
	    my($sc_link,$Level,$Printstuff) = @_;
    	    eval q( &if (($sc_link)-> &flags & ($Level)) {  &printf $Printstuff; });
	}' unless defined(&SC_DEBUGN);
    } else {
	eval 'sub SC_DEBUG {
	    my($A,$B,$C) = @_;
    	    eval q();
	}' unless defined(&SC_DEBUG);
	eval 'sub SC_DEBUGN {
	    my($A,$B,$C) = @_;
    	    eval q();
	}' unless defined(&SC_DEBUGN);
    }
}
1;
