X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffg_joystick.c;h=7d4c502033b4a34ac1fd247240f4035f69acf150;hb=2c12c9eb8d63cabac2d4113b4f54fdf53da8368c;hp=9831fb143629db055936e4dfe8f24bfddd8597f1;hpb=67f242b7dd68bea7dea467f9b5265c8448b6655e;p=freeglut diff --git a/src/fg_joystick.c b/src/fg_joystick.c index 9831fb1..7d4c502 100644 --- a/src/fg_joystick.c +++ b/src/fg_joystick.c @@ -147,14 +147,12 @@ static int fghJoystickFindUSBdev(char *name, char *out, int outlen) if (cp) return 1; } -#ifdef HAVE_ERRNO_H else if (errno == EACCES) { if (!protection_warned) { fgWarning ( "Can't open %s for read!", buf ); protection_warned = 1; } } -#endif } return 0; } @@ -172,11 +170,7 @@ static int fghJoystickInitializeHID(struct os_specific_s *os, if ( ( rd = hid_get_report_desc( os->fd ) ) == 0 ) { -#ifdef HAVE_ERRNO_H fgWarning ( "error: %s: %s", os->fname, strerror( errno ) ); -#else - fgWarning ( "error: %s", os->fname ); -#endif return FALSE; } @@ -186,11 +180,7 @@ static int fghJoystickInitializeHID(struct os_specific_s *os, if( ioctl( os->fd, USB_GET_REPORT_ID, &report_id ) < 0) { /*** XXX {report_id} may not be the right variable? ***/ -#ifdef HAVE_ERRNO_H fgWarning ( "error: %s%d: %s", UHIDDEV, report_id, strerror( errno ) ); -#else - fgWarning ( "error: %s%d", UHIDDEV, report_id ); -#endif return FALSE; }