fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / linux / joystick.h
index b7e0ab6..e2d3a18 100644 (file)
@@ -111,18 +111,37 @@ struct js_corr {
 #define JS_SET_ALL             8
 
 struct JS_DATA_TYPE {
-       int buttons;
-       int x;
-       int y;
+       __s32 buttons;
+       __s32 x;
+       __s32 y;
 };
 
-struct JS_DATA_SAVE_TYPE {
-       int JS_TIMEOUT;
-       int BUSY;
-       long JS_EXPIRETIME;
-       long JS_TIMELIMIT;
+struct JS_DATA_SAVE_TYPE_32 {
+       __s32 JS_TIMEOUT;
+       __s32 BUSY;
+       __s32 JS_EXPIRETIME;
+       __s32 JS_TIMELIMIT;
        struct JS_DATA_TYPE JS_SAVE;
        struct JS_DATA_TYPE JS_CORR;
 };
 
+struct JS_DATA_SAVE_TYPE_64 {
+       __s32 JS_TIMEOUT;
+       __s32 BUSY;
+       __s64 JS_EXPIRETIME;
+       __s64 JS_TIMELIMIT;
+       struct JS_DATA_TYPE JS_SAVE;
+       struct JS_DATA_TYPE JS_CORR;
+};
+
+#ifdef __KERNEL__
+#if BITS_PER_LONG == 64
+#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_64
+#elif BITS_PER_LONG == 32
+#define JS_DATA_SAVE_TYPE JS_DATA_SAVE_TYPE_32
+#else
+#error Unexpected BITS_PER_LONG
+#endif
+#endif
+
 #endif /* _LINUX_JOYSTICK_H */