require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&CN_DEAD)) {
    sub CN_DEAD () {	0;}
}
unless(defined(&CN_NORMAL)) {
    sub CN_NORMAL () {	1;}
}
unless(defined(&CN_INTERNAL)) {
    sub CN_INTERNAL () {	2;}
}
unless(defined(&CN_REMOTE)) {
    sub CN_REMOTE () {	3;}
}
unless(defined(&CN_FORCED)) {
    sub CN_FORCED () {	4;}
}
unless(defined(&CONSMAJOR)) {
    sub CONSMAJOR () {	0;}
}
if(defined(&_KERNEL)) {
    eval 'sub dev_type_cnprobe {
        my($n) = @_;
	    eval q( &void $n);
    }' unless defined(&dev_type_cnprobe);
    eval 'sub dev_type_cninit {
        my($n) = @_;
	    eval q( &void $n);
    }' unless defined(&dev_type_cninit);
    eval 'sub dev_type_cngetc {
        my($n) = @_;
	    eval q(\'int\' $n( &dev_t));
    }' unless defined(&dev_type_cngetc);
    eval 'sub dev_type_cnputc {
        my($n) = @_;
	    eval q( &void $n( &dev_t, \'int\'));
    }' unless defined(&dev_type_cnputc);
    eval 'sub dev_type_cnpollc {
        my($n) = @_;
	    eval q( &void $n( &dev_t, \'int\'));
    }' unless defined(&dev_type_cnpollc);
    eval 'sub dev_type_cnbell {
        my($n) = @_;
	    eval q( &void $n( &dev_t, \'u_int\', \'u_int\', \'u_int\'));
    }' unless defined(&dev_type_cnbell);
    eval 'sub cons_decl {
        my($n) = @_;
	    eval q( &dev_decl($n, &cnprobe);  &dev_decl($n, &cninit);  &dev_decl($n, &cngetc);  &dev_decl($n, &cnputc);  &dev_decl($n, &cnpollc);  &dev_decl($n, &cnbell););
    }' unless defined(&cons_decl);
    eval 'sub cons_init {
        my($n) = @_;
	    eval q({  &dev_init(1,$n, &cnprobe),  &dev_init(1,$n, &cninit),  &dev_init(1,$n, &cngetc),  &dev_init(1,$n, &cnputc),  &dev_init(1,$n, &cnpollc),  &NULL,  &NODEV,  &CN_DEAD });
    }' unless defined(&cons_init);
    eval 'sub cons_init_bell {
        my($n) = @_;
	    eval q({  &dev_init(1,$n, &cnprobe),  &dev_init(1,$n, &cninit),  &dev_init(1,$n, &cngetc),  &dev_init(1,$n, &cnputc),  &dev_init(1,$n, &cnpollc),  &dev_init(1,$n, &cnbell),  &NODEV,  &CN_DEAD });
    }' unless defined(&cons_init_bell);
}
1;
