From 23c66b6cfe3682e85b64a55ee3c0c60c7813428f Mon Sep 17 00:00:00 2001 From: ehofman Date: Sun, 22 Jun 2003 11:49:19 +0000 Subject: [PATCH] cygwin and mingw fixes --- simgear/screen/extensions.cxx | 8 -------- simgear/screen/extensions.hxx | 11 +++++++++-- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/simgear/screen/extensions.cxx b/simgear/screen/extensions.cxx index 4acf0e26..99a17086 100644 --- a/simgear/screen/extensions.cxx +++ b/simgear/screen/extensions.cxx @@ -24,14 +24,6 @@ #include -#ifdef WIN32 -#include -#endif - -#if !defined( WIN32 ) && !defined( __APPLE__ ) -#include -#endif - #include "extensions.hxx" bool SGSearchExtensionsString(char *extString, char *extName) { diff --git a/simgear/screen/extensions.hxx b/simgear/screen/extensions.hxx index ffabf4e2..a15a4759 100644 --- a/simgear/screen/extensions.hxx +++ b/simgear/screen/extensions.hxx @@ -24,8 +24,15 @@ #ifndef __SG_EXTENSIONS_HXX #define __SG_EXTENSIONS_HXX 1 +#if defined(WIN32) && !defined(__CYGWIN__) && !defined(__MINGW32__) +# include +#else +# include +#endif + #include + #if defined(__cplusplus) extern "C" { #endif @@ -44,7 +51,7 @@ bool SGIsOpenGLExtensionSupported(char *extName); inline void (*SGLookupFunction(const char *func))() { -#if defined( WIN32 ) +#if defined( WIN32 ) && !defined(__CYGWIN__) && !defined(__MINGW32__) return (void (*)()) wglGetProcAddress(func); #elif defined( __APPLE__ ) @@ -54,7 +61,7 @@ inline void (*SGLookupFunction(const char *func))() { // If the target system s UNIX and the ARB_get_proc_address // GLX extension is *not* guaranteed to be supported. An alternative // dlsym-based approach will be used instead. - #if defined( linux ) || defined ( sgi ) + #if defined( linux ) || defined ( sgi ) || defined(__CYGWIN__) || defined(__MINGW32__) void *libHandle; void (*fptr)(); libHandle = dlopen("libGL.so", RTLD_LAZY); -- 2.39.5