# include <sys/param.h>
#endif
+#include <fcntl.h>
+
/*this should be defined in a header file */
#define MAX_NUM_JOYSTICKS 2
}
}
}
-# ifdef HAVE_ERRNO_H
if ( len < 0 && errno != EAGAIN )
-# else
- if ( len < 0 )
-# endif
{
perror( joy->pJoystick.os->fname );
joy->error = 1;
if ( status != sizeof( struct js_event ) )
{
-# ifdef HAVE_ERRNO_H
if ( errno == EAGAIN )
{
/* Use the old values */
sizeof( float ) * joy->num_axes );
return;
}
-# endif
fgWarning ( "%s", joy->pJoystick.fname );
joy->error = GL_TRUE;
joy->pJoystick.os->fd = open( joy->pJoystick.os->fname, O_RDONLY | O_NONBLOCK);
-#ifdef HAVE_ERRNO_H
if( joy->pJoystick.os->fd < 0 && errno == EACCES )
fgWarning ( "%s exists but is not readable by you", joy->pJoystick.os->fname );
-#endif
joy->error =( joy->pJoystick.os->fd < 0 );