diff options
author | Brian Paul <[email protected]> | 2004-11-08 15:08:48 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2004-11-08 15:08:48 +0000 |
commit | 83889ffd970a807074d834849677fd233c031dc7 (patch) | |
tree | f048187a4bcbc88b0e73dd028830f30642447602 /src | |
parent | 5849e3d353d956643dd40a3d5f53c31e79ae8cf0 (diff) |
Remove need for defining _MSC_VER when building Mesa for windows with
a non MS C compiler (MinGW). (Gregor Anich)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/Makefile.mgw | 2 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gdi/wmesa.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/windows/gdi/wmesadef.h | 2 | ||||
-rw-r--r-- | src/mesa/main/glheader.h | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw index 336463ec78f..80145e50f52 100644 --- a/src/mesa/Makefile.mgw +++ b/src/mesa/Makefile.mgw @@ -71,7 +71,7 @@ endif LDLIBS = -lgdi32 CC = mingw32-gcc -CFLAGS += -DBUILD_GL32 -D_OPENGL32_ -D_MSC_VER +CFLAGS += -DBUILD_GL32 -D_OPENGL32_ CFLAGS += $(INCLUDE_DIRS) CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1 ifeq ($(FX),1) diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c index 96cfafff4c3..acd5f4a34fb 100644 --- a/src/mesa/drivers/windows/gdi/wmesa.c +++ b/src/mesa/drivers/windows/gdi/wmesa.c @@ -18,7 +18,7 @@ * Updated for Mesa 4.0 by Karl Schultz ([email protected]) */ -#ifdef NDEBUG +#if defined(NDEBUG) && defined(_MSC_VER) #pragma auto_inline(on) #pragma inline_depth(255) #pragma inline_recursion(on) @@ -74,7 +74,7 @@ /* Stereo and parallel not tested for Mesa 4.0. */ #define NO_STEREO #if !defined(NO_STEREO) -#include "gl\glu.h" +#include "GL/glu.h" #include "stereo.h" #endif @@ -114,6 +114,8 @@ WMesaContext WC = NULL; #if defined(_MSC_VER) && _MSC_VER >= 1200 #define FORCEINLINE __forceinline +#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) +#define FORCEINLINE __attribute__((always_inline)) #else #define FORCEINLINE __inline #endif diff --git a/src/mesa/drivers/windows/gdi/wmesadef.h b/src/mesa/drivers/windows/gdi/wmesadef.h index 3c267aa0f6a..d43e990ed3c 100644 --- a/src/mesa/drivers/windows/gdi/wmesadef.h +++ b/src/mesa/drivers/windows/gdi/wmesadef.h @@ -70,7 +70,7 @@ #include <windows.h> -#include <GL\gl.h> +#include <GL/gl.h> #include "context.h" #ifdef DDRAW #define DIRECTDRAW_VERSION 0x0100 diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h index 3057770d095..5068e90c609 100644 --- a/src/mesa/main/glheader.h +++ b/src/mesa/main/glheader.h @@ -98,10 +98,10 @@ # pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */ # endif # endif -# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ +# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ # define GLAPI __declspec(dllexport) # define WGLAPI __declspec(dllexport) -# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ +# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ # define GLAPI __declspec(dllimport) # define WGLAPI __declspec(dllimport) # else /* for use with static link lib build of Win32 edition only */ |