removed all HAVE_ERRNO checks
[freeglut] / src / x11 / fg_joystick_x11.c
index 1815577..17dc2c3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * freeglut_joystick_x11.c
+ * fg_joystick_x11.c
  *
  * Joystick handling code
  *
@@ -115,11 +115,7 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
             }
         }
     }
-#    ifdef HAVE_ERRNO_H
     if ( len < 0 && errno != EAGAIN )
-#    else
-    if ( len < 0 )
-#    endif
     {
         perror( joy->pJoystick.os->fname );
         joy->error = 1;
@@ -138,7 +134,6 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
 
         if ( status != sizeof( struct js_event ) )
         {
-#  ifdef HAVE_ERRNO_H
             if ( errno == EAGAIN )
             {
                 /* Use the old values */
@@ -149,7 +144,6 @@ void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
                             sizeof( float ) * joy->num_axes );
                 return;
             }
-#  endif
 
             fgWarning ( "%s", joy->pJoystick.fname );
             joy->error = GL_TRUE;
@@ -241,10 +235,8 @@ void fgPlatformJoystickOpen( SFG_Joystick* joy )
 
     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 );