From bdbab22de6556e904343d5d4bb21c20595f57b0b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 31 May 2019 21:42:15 +0300 Subject: Fix compilation warnings with new mesa and SDL 1.2 Add workaround to fix SDL redefine bug. --- src/resources/fboinfo.h | 6 ++++++ src/resources/image/image.h | 6 ++++++ src/resources/openglimagehelper.h | 6 ++++++ src/resources/safeopenglimagehelper.h | 6 ++++++ 4 files changed, 24 insertions(+) (limited to 'src/resources') diff --git a/src/resources/fboinfo.h b/src/resources/fboinfo.h index e18e9b938..5f47630c1 100644 --- a/src/resources/fboinfo.h +++ b/src/resources/fboinfo.h @@ -29,10 +29,16 @@ #include #include #else // ANDROID +#ifdef HAVE_GLEXT +#define NO_SDL_GLEXT +#endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") #include PRAGMA48(GCC diagnostic pop) +#ifdef HAVE_GLEXT +#include +#endif // HAVE_GLEXT #if defined(__APPLE__) #include #elif !defined(__native_client__) diff --git a/src/resources/image/image.h b/src/resources/image/image.h index 31836483e..b15ff7d33 100644 --- a/src/resources/image/image.h +++ b/src/resources/image/image.h @@ -37,10 +37,16 @@ #ifndef USE_SDL2 #define GL_GLEXT_PROTOTYPES 1 #endif // USE_SDL2 +#ifdef HAVE_GLEXT +#define NO_SDL_GLEXT +#endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") #include PRAGMA48(GCC diagnostic pop) +#ifdef HAVE_GLEXT +#include +#endif // HAVE_GLEXT #endif // ANDROID #endif // USE_OPENGL diff --git a/src/resources/openglimagehelper.h b/src/resources/openglimagehelper.h index b2fd153e6..173f53bb7 100644 --- a/src/resources/openglimagehelper.h +++ b/src/resources/openglimagehelper.h @@ -41,10 +41,16 @@ #ifndef USE_SDL2 #define GL_GLEXT_PROTOTYPES 1 #endif // USE_SDL2 +#ifdef HAVE_GLEXT +#define NO_SDL_GLEXT +#endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") #include PRAGMA48(GCC diagnostic pop) +#ifdef HAVE_GLEXT +#include +#endif // HAVE_GLEXT #endif // ANDROID class Dye; diff --git a/src/resources/safeopenglimagehelper.h b/src/resources/safeopenglimagehelper.h index c212288f8..4a2e9346b 100644 --- a/src/resources/safeopenglimagehelper.h +++ b/src/resources/safeopenglimagehelper.h @@ -41,10 +41,16 @@ #ifndef USE_SDL2 #define GL_GLEXT_PROTOTYPES 1 #endif // USE_SDL2 +#ifdef HAVE_GLEXT +#define NO_SDL_GLEXT +#endif // HAVE_GLEXT PRAGMA48(GCC diagnostic push) PRAGMA48(GCC diagnostic ignored "-Wshadow") #include PRAGMA48(GCC diagnostic pop) +#ifdef HAVE_GLEXT +#include +#endif // HAVE_GLEXT #endif // ANDROID class Dye; -- cgit v1.2.3-70-g09d2