From 7dc47277c7c0b1cebdc033c9707fe29e0dcd411c Mon Sep 17 00:00:00 2001 From: fayjf 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: https://svn.code.sf.net/p/freeglut/code/trunk@762 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/src/freeglut_internal.h | 9 +++++++++ freeglut/freeglut/src/freeglut_joystick.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/freeglut/freeglut/src/freeglut_internal.h b/freeglut/freeglut/src/freeglut_internal.h index c48d79b..9b3b2d2 100644 --- a/freeglut/freeglut/src/freeglut_internal.h +++ b/freeglut/freeglut/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/freeglut/freeglut/src/freeglut_joystick.c b/freeglut/freeglut/src/freeglut_joystick.c index 547c839..1269a76 100644 --- a/freeglut/freeglut/src/freeglut_joystick.c +++ b/freeglut/freeglut/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;