From 28642dd16a96fb5bf7d90a8ba99ec33684a92ddd Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Mon, 2 Feb 2009 22:43:50 +0000 Subject: [PATCH] Fixing bug [ 1804696 ] Warnings when building on OpenSolaris as updated 2/2/09 by Nigel Stewart git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@762 7f0cb862-5218-0410-a997-914c9d46530a --- src/freeglut_internal.h | 9 +++++++++ src/freeglut_joystick.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/freeglut_internal.h b/src/freeglut_internal.h index c48d79b..9b3b2d2 100644 --- a/src/freeglut_internal.h +++ b/src/freeglut_internal.h @@ -57,6 +57,11 @@ */ #endif +/* Detect both SunPro and gcc compilers on Sun Solaris */ +#if defined (__SVR4) && defined (__sun) +# define TARGET_HOST_SOLARIS 1 +#endif + #ifndef TARGET_HOST_MS_WINDOWS # define TARGET_HOST_MS_WINDOWS 0 #endif @@ -69,6 +74,10 @@ # define TARGET_HOST_MAC_OSX 0 #endif +#ifndef TARGET_HOST_SOLARIS +# define TARGET_HOST_SOLARIS 0 +#endif + /* -- FIXED CONFIGURATION LIMITS ------------------------------------------- */ #define FREEGLUT_MAX_MENUS 3 diff --git a/src/freeglut_joystick.c b/src/freeglut_joystick.c index 547c839..1269a76 100644 --- a/src/freeglut_joystick.c +++ b/src/freeglut_joystick.c @@ -1394,7 +1394,7 @@ static void fghJoystickOpen( SFG_Joystick* joy ) # endif #endif -#if defined( __linux__ ) +#if defined( __linux__ ) || TARGET_HOST_SOLARIS /* Default for older Linux systems. */ joy->num_axes = 2; joy->num_buttons = 32; -- 1.7.10.4