From 812eb4fa9c69400b4bd0c10e29db3ca14dc51bf0 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 28 Jan 2014 20:25:18 +0100
Subject: Hack Glee to compile (we don't need GLX!)


diff --git a/src/modules/graphics/opengl/GLee.c b/src/modules/graphics/opengl/GLee.c
index 789e189..850a87d 100644
--- a/src/modules/graphics/opengl/GLee.c
+++ b/src/modules/graphics/opengl/GLee.c
@@ -22418,7 +22418,7 @@ const char *__GLeeGetExtStrPlat( void )
 
 	if (wglGetExtensionsStringARB)
 		return (const char *)wglGetExtensionsStringARB(wglGetCurrentDC());
-#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)
 #else
 	Display *dpy=glXGetCurrentDisplay();
 	if(dpy)
diff --git a/src/modules/graphics/opengl/GLee.h b/src/modules/graphics/opengl/GLee.h
index 631cddc..42782ec 100644
--- a/src/modules/graphics/opengl/GLee.h
+++ b/src/modules/graphics/opengl/GLee.h
@@ -64,7 +64,9 @@
 	#define __glxext_h_ /* prevent glxext.h from being included */
 	#define GLX_GLXEXT_PROTOTYPES
 	#include <GL/gl.h>
-	#include <GL/glx.h>
+	#ifndef __HAIKU__
+		#include <GL/glx.h>
+	#endif
 #endif
 
 #ifndef APIENTRY
@@ -1152,7 +1154,7 @@ GLEE_EXTERN GLboolean _GLEE_SGIX_igloo_interface;
 		DECLARE_HANDLE(HVIDEOINPUTDEVICENV);
 	#endif
 	
-#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)
 
 	/* Mac OS X */
 
@@ -23178,7 +23180,7 @@ GLEE_EXTERN GLboolean _GLEE_WGL_NV_video_output;
   #define wglGetVideoInfoNV GLeeFuncPtr_wglGetVideoInfoNV
 #endif
 #endif 
-#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#elif defined(__APPLE__) || defined(__APPLE_CC__) || defined(__HAIKU__)
 #else /* GLX */
 
 /* Extension querying variables */
-- 
1.8.3.4


From cd63b6001a9dca28e0af9803b50f5127621ef1b7 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Tue, 1 Apr 2014 22:32:15 +0200
Subject: Remove dupliczte definition of __stdcall

* Haiku defines that to empty already, for legacy reasons.

diff --git a/src/modules/graphics/opengl/GLee.c b/src/modules/graphics/opengl/GLee.c
index 850a87d..1f46525 100644
--- a/src/modules/graphics/opengl/GLee.c
+++ b/src/modules/graphics/opengl/GLee.c
@@ -55,7 +55,7 @@ typedef GLuint(*GLEE_LINK_FUNCTION)(void);
 
 GLboolean __GLeeInited=GL_FALSE;
 
-#ifndef _WIN32
+#if !defined(_WIN32) && !defined(__HAIKU__)
 	#define __stdcall  /* nothing */
 #endif 
 
-- 
1.8.3.4

