require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_FAULT_H_)) {
    eval 'sub _SYS_FAULT_H_ () {1;}' unless defined(&_SYS_FAULT_H_);
    if(defined(&_KERNEL_OPT)) {
	require './sys/opt_fault.ph';
    }
    if(!defined(&_KERNEL) || defined(&FAULT)) {
	eval 'sub FAULT_SCOPE_GLOBAL () {0;}' unless defined(&FAULT_SCOPE_GLOBAL);
	eval 'sub FAULT_SCOPE_LWP () {1;}' unless defined(&FAULT_SCOPE_LWP);
	eval 'sub FAULT_MODE_NTH_ONESHOT () {0;}' unless defined(&FAULT_MODE_NTH_ONESHOT);
	eval 'sub FAULT_NTH_MIN () {2;}' unless defined(&FAULT_NTH_MIN);
	eval 'sub FAULT_IOC_ENABLE () { &_IOW (ord(\'F\'), 1, \'struct fault_ioc_enable\');}' unless defined(&FAULT_IOC_ENABLE);
	eval 'sub FAULT_IOC_DISABLE () { &_IOW (ord(\'F\'), 2, \'struct fault_ioc_disable\');}' unless defined(&FAULT_IOC_DISABLE);
	eval 'sub FAULT_IOC_GETINFO () { &_IOWR(ord(\'F\'), 3, \'struct fault_ioc_getinfo\');}' unless defined(&FAULT_IOC_GETINFO);
    }
    if(defined(&_KERNEL)) {
	if(defined(&FAULT)) {
	} else {
	    eval 'sub fault_inject () {
	        eval q( &false);
	    }' unless defined(&fault_inject);
	}
    }
}
1;
