summaryrefslogtreecommitdiff
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/glheader.h2
-rw-r--r--src/mesa/main/imports.c4
-rw-r--r--src/mesa/main/imports.h4
-rw-r--r--src/mesa/main/shaders.c8
-rw-r--r--src/mesa/main/texcompress_fxt1.c5
5 files changed, 18 insertions, 5 deletions
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 63dd002a41..fd4127558a 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -92,7 +92,7 @@
#endif
#ifdef WGLAPI
-#undef WGLAPI
+# undef WGLAPI
#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 8a5dfdb4b8..3ae56c8b0b 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -575,7 +575,11 @@ _mesa_ffs(int i)
* if no bits set.
*/
int
+#ifdef __MINGW32__
+_mesa_ffsll(long val)
+#else
_mesa_ffsll(long long val)
+#endif
{
#ifdef ffsll
return ffsll(val);
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 9be8014a13..ebdfc452a7 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -700,7 +700,11 @@ extern int
_mesa_ffs(int i);
extern int
+#ifdef __MINGW32__
+_mesa_ffsll(long i);
+#else
_mesa_ffsll(long long i);
+#endif
extern unsigned int
_mesa_bitcount(unsigned int n);
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 58be1f46e5..7bf8808767 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -83,7 +83,7 @@ _mesa_CreateShader(GLenum type)
}
-GLhandleARB APIENTRY
+GLhandleARB GLAPIENTRY
_mesa_CreateShaderObjectARB(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
@@ -99,7 +99,7 @@ _mesa_CreateProgram(void)
}
-GLhandleARB APIENTRY
+GLhandleARB GLAPIENTRY
_mesa_CreateProgramObjectARB(void)
{
GET_CURRENT_CONTEXT(ctx);
@@ -319,7 +319,7 @@ _mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params)
#if 0
-GLint APIENTRY
+GLint GLAPIENTRY
_mesa_GetUniformLocation(GLuint program, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
@@ -336,7 +336,7 @@ _mesa_GetHandleARB(GLenum pname)
}
-GLint APIENTRY
+GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 411d51cfcc..b6991f45ed 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -302,7 +302,12 @@ const struct gl_texture_format _mesa_texformat_rgba_fxt1 = {
#define FX64_NATIVE 1
+#ifdef __MINGW32__
+typedef unsigned long Fx64;
+#else
typedef unsigned long long Fx64;
+#endif
+
#define FX64_MOV32(a, b) a = b
#define FX64_OR32(a, b) a |= b