require '_h2ph_pre.ph';

no warnings qw(redefine misc);

unless(defined(&_SUN_VUID_EVENT_H_)) {
    eval 'sub _SUN_VUID_EVENT_H_ () {1;}' unless defined(&_SUN_VUID_EVENT_H_);
    require 'sys/ioccom.ph';
    if(defined(&_KERNEL)) {
	eval 'sub firm_gettime {
	    my($fev) = @_;
    	    eval q({ \'struct timeval\'  &tv;  &getmicrotime( &tv);  ($fev->{time}->{tv_sec}) =  ($tv->{tv_sec});  ($fev->{time}->{tv_usec}) =  ($tv->{tv_usec}); });
	}' unless defined(&firm_gettime);
    }
    eval 'sub MS_LEFT () {0x7f20;}' unless defined(&MS_LEFT);
    eval 'sub MS_MIDDLE () {0x7f21;}' unless defined(&MS_MIDDLE);
    eval 'sub MS_RIGHT () {0x7f22;}' unless defined(&MS_RIGHT);
    eval 'sub LOC_X_DELTA () {0x7f80;}' unless defined(&LOC_X_DELTA);
    eval 'sub LOC_Y_DELTA () {0x7f81;}' unless defined(&LOC_Y_DELTA);
    eval 'sub LOC_X_ABSOLUTE () {0x7f82;}' unless defined(&LOC_X_ABSOLUTE);
    eval 'sub LOC_Y_ABSOLUTE () {0x7f83;}' unless defined(&LOC_Y_ABSOLUTE);
    eval 'sub VKEY_UP () {0;}' unless defined(&VKEY_UP);
    eval 'sub VKEY_DOWN () {1;}' unless defined(&VKEY_DOWN);
    eval 'sub VUIDSFORMAT () { &_IOW(ord(\'v\'), 1, \'int\');}' unless defined(&VUIDSFORMAT);
    eval 'sub VUIDGFORMAT () { &_IOR(ord(\'v\'), 2, \'int\');}' unless defined(&VUIDGFORMAT);
    eval 'sub VUID_FIRM_EVENT () {1;}' unless defined(&VUID_FIRM_EVENT);
}
1;
