require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_ISP_LIBRARY_H)) {
    eval 'sub _ISP_LIBRARY_H () {1;}' unless defined(&_ISP_LIBRARY_H);
    eval 'sub ISP_HANDLE_MASK () {0x7fff;}' unless defined(&ISP_HANDLE_MASK);
    if(defined(&ISP_TARGET_MODE)) {
	if(defined( &__NetBSD__) || defined( &__OpenBSD__)) {
	    require 'dev/ic/isp_target.ph';
	}
 elsif(defined( &__FreeBSD__)) {
	    require 'dev/isp/isp_target.ph';
	} else {
	    require './dev/ic/isp_target.ph';
	}
	eval 'sub IS_TARGET_HANDLE {
	    my($x) = @_;
    	    eval q((($x) & 0x8000));
	}' unless defined(&IS_TARGET_HANDLE);
    }
}
1;
