From 3b7f7bd2ad0e15821b2737c5e3af4a67cf39d8c2 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 12 Dec 2002 20:11:01 +0000 Subject: [PATCH] get working with both older (0.3) and newer (2.2) mingw --- include/winquake.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/winquake.h b/include/winquake.h index 82656fc6d..c04af5fe5 100644 --- a/include/winquake.h +++ b/include/winquake.h @@ -35,6 +35,13 @@ #ifdef _WIN32 +#ifdef HAVE__MINGW_H +# include <_mingw.h> +# if __MINGW32_MAJOR_VERSION == 0 && __MINGW32_MINOR_VERSION == 3 +# define MINGW_HACKS +# endif +#endif + #ifndef __GNUC__ # pragma warning( disable : 4229 ) /* mgraph gets this */ #endif @@ -42,19 +49,27 @@ #define byte __hide_byte #define shutdown __hide_shutdown +#ifdef MINGW_HACKS #define LPCWAVEFORMATEX __hide_LPCWAVEFORMATEX +#endif #include +#ifdef MINGW_HACKS #undef LPCWAVEFORMATEX +#endif #ifdef WINNT -# undef WINNT -# ifdef HAVE_DSOUND_H -# include +# ifdef MINGW_HACKS +# undef WINNT # endif # ifdef HAVE_DDRAW_H # include # endif -# define WINNT +# ifdef MINGW_HACKS +# define WINNT +# endif +# ifdef HAVE_DSOUND_H +# include +# endif #else # include # ifdef HAVE_DSOUND_H