Testing!
[freeglut] / src / freeglut_joystick.c
index 061a038..3c2fa9e 100644 (file)
  *  Many thanks for Steve Baker for permission to pull from that library.
  */
 
-#if defined( __FreeBSD__ ) || defined( __NetBSD__ )
-#    include <sys/param.h>
-#endif
-
 #include <GL/freeglut.h>
 #include "freeglut_internal.h"
+#if HAVE_SYS_PARAM_H
+#    include <sys/param.h>
+#endif
 
 /*
  * Initial defines from "js.h" starting around line 33 with the existing "freeglut_joystick.c"
@@ -61,7 +60,6 @@
 #    define _JS_MAX_AXES  8
 #    include <windows.h>
 #    include <mmsystem.h>
-#    include <string.h>
 #    include <regstr.h>
 
 #endif
@@ -74,6 +72,7 @@
 #    if HAVE_FCNTL_H
 #        include <fcntl.h>
 #    endif
+#    include <errno.h>
 #    if defined(__FreeBSD__) || defined(__NetBSD__)
 /* XXX The below hack is done until freeglut's autoconf is updated. */
 #        define HAVE_USB_JS    1
@@ -94,8 +93,6 @@
 #        define JS_RETURN (sizeof(struct JS_DATA_TYPE))
 #    endif
 
-#    include <errno.h>
-
 #    if defined(__linux__)
 #        include <linux/joystick.h>