require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&EVENT2_RPC_COMPAT_H_INCLUDED_)) {
    eval 'sub EVENT2_RPC_COMPAT_H_INCLUDED_ () {1;}' unless defined(&EVENT2_RPC_COMPAT_H_INCLUDED_);
    if(defined(&__cplusplus)) {
    }
    if(defined(&__GNUC__)  && !defined(&__STRICT_ANSI__)) {
	undef(&EVTAG_ASSIGN) if defined(&EVTAG_ASSIGN);
	undef(&EVTAG_GET) if defined(&EVTAG_GET);
	undef(&EVTAG_ADD) if defined(&EVTAG_ADD);
	eval 'sub EVTAG_ASSIGN () {( &msg,  &member,  &args...) (*( &msg)-> ($base->{member}) &_assign)( &msg,   &args);}' unless defined(&EVTAG_ASSIGN);
	eval 'sub EVTAG_GET () {( &msg,  &member,  &args...) (*( &msg)-> ($base->{member}) &_get)( &msg,   &args);}' unless defined(&EVTAG_GET);
	eval 'sub EVTAG_ADD () {( &msg,  &member,  &args...) (*( &msg)-> ($base->{member}) &_add)( &msg,   &args);}' unless defined(&EVTAG_ADD);
    }
    eval 'sub EVTAG_LEN {
        my($msg, $member) = @_;
	    eval q((($msg)->$member &_length));
    }' unless defined(&EVTAG_LEN);
    if(defined(&__cplusplus)) {
    }
}
1;
