X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_joystick.c;h=080b71fb079da301e258f73097c3dd53aa9cb8c7;hb=f075b2126dff4d88bc2811281f0d27e7c0581ab4;hp=fb77bb4584253525102876b2a36b2d7b641d8d10;hpb=2c9161e532490d2623896ad4720fb5e7bb6480bb;p=freeglut diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index fb77bb4..080b71f 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -31,12 +31,11 @@ * Many thanks for Steve Baker for permission to pull from that library. */ -#if defined( __FreeBSD__ ) || defined( __NetBSD__ ) -# include -#endif - #include #include "freeglut_internal.h" +#if HAVE_SYS_PARAM_H +# include +#endif /* * Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c" @@ -61,18 +60,25 @@ # define _JS_MAX_AXES 8 # include # include -# include # include #endif #if TARGET_HOST_UNIX_X11 # define _JS_MAX_AXES 16 +# if HAVE_SYS_IOCTL_H +# include +# endif +# if HAVE_FCNTL_H +# include +# endif +# if HAVE_ERRNO_H +# include +# endif # if defined(__FreeBSD__) || defined(__NetBSD__) /* XXX The below hack is done until freeglut's autoconf is updated. */ # define HAVE_USB_JS 1 -# include # if defined(__FreeBSD__) && __FreeBSD_version >= 500000 # include # else @@ -89,11 +95,7 @@ # define JS_RETURN (sizeof(struct JS_DATA_TYPE)) # endif -# include -# include - # if defined(__linux__) -# include # include /* check the joystick driver version */