require '_h2ph_pre.ph';

no warnings 'redefine';

require 'sys/timeout.ph';
unless(defined(&RLNMBOX_VOID)) {
    sub RLNMBOX_VOID () {	0;}
}
unless(defined(&RLNMBOX_EMPTY)) {
    sub RLNMBOX_EMPTY () {	1;}
}
unless(defined(&RLNMBOX_FILLING)) {
    sub RLNMBOX_FILLING () {	2;}
}
unless(defined(&RLNMBOX_FILLED)) {
    sub RLNMBOX_FILLED () {	3;}
}
unless(defined(&RLN_NMBOX)) {
    sub RLN_NMBOX () {	0x7c;}
}
unless(defined(&RLN_CTYPE_OEM)) {
    sub RLN_CTYPE_OEM () {	0x1;}
}
unless(defined(&RLN_CTYPE_UISA)) {
    sub RLN_CTYPE_UISA () {	0x2;}
}
unless(defined(&RLN_CTYPE_ONE_PIECE)) {
    sub RLN_CTYPE_ONE_PIECE () {	0x4;}
}
if(defined(&RLNDEBUG_REG)) {
}
unless(defined(&RLN_STATE_SYNC)) {
    sub RLN_STATE_SYNC () {	0x1;}
}
unless(defined(&RLN_STATE_NEEDINIT)) {
    sub RLN_STATE_NEEDINIT () {	0x2;}
}
unless(defined(&RLN_STATE_PROMISC)) {
    sub RLN_STATE_PROMISC () {	0x4;}
}
unless(defined(&rln_need_reset)) {
    sub rln_need_reset {
	my($sc) = @_;
	eval q(($sc)-> &sc_state |=  &RLN_STATE_NEEDINIT);
    }
}
unless(defined(&RLN_PDATA_INIT)) {
    sub RLN_PDATA_INIT () {	{0,0};}
}
unless(defined(&RLN_WAKEUP_SET)) {
    sub RLN_WAKEUP_SET () {	0xff;}
}
unless(defined(&RLN_WAKEUP_NOCHANGE)) {
    sub RLN_WAKEUP_NOCHANGE () {	(0x80|0x10);}
}
if(defined(&RLNDEBUG)) {
    eval 'sub dprintf () {( &fmt,  &args...)  &printf( &fmt ,   &args);}' unless defined(&dprintf);
    eval 'sub dprinthex {
        my($buf, $len) = @_;
	    eval q( &do { \'unsigned char\' * &_b = ($buf); \'int\'  &_i,  &_l=($len);  &printf(\\"{\\");  &for( &_i = 0;  &_i <  &_l;  &_i++) {  &printf(\\"%02x\\",  $_b[ &_i]);  &if ( &_i % 4== 3 &&  &_i !=  &_l - 1)  &printf(\\",\\"); }  &printf(\\"}\\"); }  &while (0));
    }' unless defined(&dprinthex);
} else {
    eval 'sub dprintf () {( &fmt,  &args...);}' unless defined(&dprintf);
    eval 'sub dprinthex {
        my($buf, $len) = @_;
	    eval q();
    }' unless defined(&dprinthex);
}
unless(defined(&RLNDUMP)) {
    sub RLNDUMP () {	1;}
}
unless(defined(&RLNDUMPHEX)) {
    sub RLNDUMPHEX {
	my($buf, $buflen) = @_;
	eval q( &do { 'int'  &_i;  &for ( &_i = 0;  &_i < ;  &_i++) {  &printf(\"%02x\", (($buf))[ &_i]);  &if ( &_i != ($buflen) - 1 &&  &_i % 4== 3)  &printf(\",\"); } }  &while (0));
    }
}
1;
