require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SYS_EVCNT_H_)) {
    eval 'sub _SYS_EVCNT_H_ () {1;}' unless defined(&_SYS_EVCNT_H_);
    require 'sys/queue.ph';
    require 'sys/stdint.ph';
    eval 'sub EVCNT_STRING_MAX () {255;}' unless defined(&EVCNT_STRING_MAX);
    eval 'sub EVCNT_TYPE_ANY () {-1;}' unless defined(&EVCNT_TYPE_ANY);
    eval 'sub EVCNT_TYPE_MISC () {0;}' unless defined(&EVCNT_TYPE_MISC);
    eval 'sub EVCNT_TYPE_INTR () {1;}' unless defined(&EVCNT_TYPE_INTR);
    eval 'sub EVCNT_TYPE_TRAP () {2;}' unless defined(&EVCNT_TYPE_TRAP);
    if(defined(&__HAVE_LEGACY_INTRCNT)) {
    }
    eval 'sub EVCNT_INITIALIZER {
        my($type, $parent, $group, $name) = @_;
	    eval q({ . &ev_type = $type, . &ev_parent = $parent, . &ev_group = $group, . &ev_name = $name, });
    }' unless defined(&EVCNT_INITIALIZER);
    eval 'sub EVCNT_ATTACH_STATIC {
        my($ev) = @_;
	    eval q( &__link_set_add_data( &evcnts, $ev));
    }' unless defined(&EVCNT_ATTACH_STATIC);
    eval 'sub EVCNT_ATTACH_STATIC2 {
        my($ev, $n) = @_;
	    eval q( &__link_set_add_data2( &evcnts, $ev, $n));
    }' unless defined(&EVCNT_ATTACH_STATIC2);
    if(defined(&_KERNEL)) {
    }
}
1;
