require '_h2ph_pre.ph';

unless(defined(&_LINUX_JOYSTICK_H)) {
    eval 'sub _LINUX_JOYSTICK_H () {1;}' unless defined(&_LINUX_JOYSTICK_H);
    require 'asm/types.ph';
    require 'linux/input.ph';
    eval 'sub JS_VERSION () {0x20100;}' unless defined(&JS_VERSION);
    eval 'sub JS_EVENT_BUTTON () {0x1;}' unless defined(&JS_EVENT_BUTTON);
    eval 'sub JS_EVENT_AXIS () {0x2;}' unless defined(&JS_EVENT_AXIS);
    eval 'sub JS_EVENT_INIT () {0x80;}' unless defined(&JS_EVENT_INIT);
    eval 'sub JSIOCGVERSION () { &_IOR(ord(\'j\'), 0x1,  &__u32);}' unless defined(&JSIOCGVERSION);
    eval 'sub JSIOCGAXES () { &_IOR(ord(\'j\'), 0x11,  &__u8);}' unless defined(&JSIOCGAXES);
    eval 'sub JSIOCGBUTTONS () { &_IOR(ord(\'j\'), 0x12,  &__u8);}' unless defined(&JSIOCGBUTTONS);
    eval 'sub JSIOCGNAME {
        local($len) = @_;
	    eval q( &_IOC( &_IOC_READ, ord(\'j\'), 0x13, $len));
    }' unless defined(&JSIOCGNAME);
    eval 'sub JSIOCSCORR () { &_IOW(ord(\'j\'), 0x21, \'struct js_corr\');}' unless defined(&JSIOCSCORR);
    eval 'sub JSIOCGCORR () { &_IOR(ord(\'j\'), 0x22, \'struct js_corr\');}' unless defined(&JSIOCGCORR);
    eval 'sub JSIOCSAXMAP () { &_IOW(ord(\'j\'), 0x31,  $__u8[ &ABS_MAX]);}' unless defined(&JSIOCSAXMAP);
    eval 'sub JSIOCGAXMAP () { &_IOR(ord(\'j\'), 0x32,  $__u8[ &ABS_MAX]);}' unless defined(&JSIOCGAXMAP);
    eval 'sub JSIOCSBTNMAP () { &_IOW(ord(\'j\'), 0x33,  $__u16[ &KEY_MAX -  &BTN_MISC]);}' unless defined(&JSIOCSBTNMAP);
    eval 'sub JSIOCGBTNMAP () { &_IOR(ord(\'j\'), 0x34,  $__u16[ &KEY_MAX -  &BTN_MISC]);}' unless defined(&JSIOCGBTNMAP);
    eval 'sub JS_CORR_NONE () {0x;}' unless defined(&JS_CORR_NONE);
    eval 'sub JS_CORR_BROKEN () {0x1;}' unless defined(&JS_CORR_BROKEN);
    eval 'sub JS_RETURN () {$sizeof{\'struct JS_DATA_TYPE\'};}' unless defined(&JS_RETURN);
    eval 'sub JS_TRUE () {1;}' unless defined(&JS_TRUE);
    eval 'sub JS_FALSE () {0;}' unless defined(&JS_FALSE);
    eval 'sub JS_X_0 () {0x1;}' unless defined(&JS_X_0);
    eval 'sub JS_Y_0 () {0x2;}' unless defined(&JS_Y_0);
    eval 'sub JS_X_1 () {0x4;}' unless defined(&JS_X_1);
    eval 'sub JS_Y_1 () {0x8;}' unless defined(&JS_Y_1);
    eval 'sub JS_MAX () {2;}' unless defined(&JS_MAX);
    eval 'sub JS_DEF_TIMEOUT () {0x1300;}' unless defined(&JS_DEF_TIMEOUT);
    eval 'sub JS_DEF_CORR () {0;}' unless defined(&JS_DEF_CORR);
    eval 'sub JS_DEF_TIMELIMIT () {10;}' unless defined(&JS_DEF_TIMELIMIT);
    eval 'sub JS_SET_CAL () {1;}' unless defined(&JS_SET_CAL);
    eval 'sub JS_GET_CAL () {2;}' unless defined(&JS_GET_CAL);
    eval 'sub JS_SET_TIMEOUT () {3;}' unless defined(&JS_SET_TIMEOUT);
    eval 'sub JS_GET_TIMEOUT () {4;}' unless defined(&JS_GET_TIMEOUT);
    eval 'sub JS_SET_TIMELIMIT () {5;}' unless defined(&JS_SET_TIMELIMIT);
    eval 'sub JS_GET_TIMELIMIT () {6;}' unless defined(&JS_GET_TIMELIMIT);
    eval 'sub JS_GET_ALL () {7;}' unless defined(&JS_GET_ALL);
    eval 'sub JS_SET_ALL () {8;}' unless defined(&JS_SET_ALL);
}
1;
