Mesa (gallium-0.2): glut: Don't include mesa_wgl.h on MinGW builds.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Jan 23 14:55:28 UTC 2009


Module: Mesa
Branch: gallium-0.2
Commit: 4558f6a7e4bb8757431bd6905be53aef4246bcdd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4558f6a7e4bb8757431bd6905be53aef4246bcdd

Author: José Fonseca <jfonseca at vmware.com>
Date:   Thu Jan 22 14:29:01 2009 +0000

glut: Don't include mesa_wgl.h on MinGW builds.

windows.h header recent MinGW versions already declare the WGL API, and
including mesa_wgl.h actually cause build failures.

---

 include/GL/glut.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/include/GL/glut.h b/include/GL/glut.h
index 4922536..45fed43 100644
--- a/include/GL/glut.h
+++ b/include/GL/glut.h
@@ -11,7 +11,10 @@
 #include <GL/glu.h>
 
 #if defined(__MINGW32__)
-#include <GL/mesa_wgl.h>
+#  ifndef WIN32_LEAN_AND_MEAN
+#    define WIN32_LEAN_AND_MEAN 1
+#  endif
+#  include <windows.h>
 #endif
 
 #ifdef __cplusplus




More information about the mesa-commit mailing list