$OpenBSD$
--- indra/llwindow/llwindowsdl.cpp.orig	Thu Nov 29 16:47:12 2007
+++ indra/llwindow/llwindowsdl.cpp	Mon Apr 14 13:50:49 2008
@@ -50,7 +50,7 @@ extern "C" {
 }
 #endif // LL_GTK
 
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX || LL_SOLARIS || defined(__OpenBSD__)
 // not necessarily available on random SDL platforms, so #if LL_LINUX
 // for execv(), waitpid(), fork()
 # include <unistd.h>
@@ -135,7 +135,7 @@ BOOL ll_try_gtk_init(void)
 			<< gtk_major_version << "."
 			<< gtk_minor_version << "."
 			<< gtk_micro_version << llendl;
-		gchar *gtk_warning;
+		const gchar *gtk_warning;
 		maybe_lock_display();
 		gtk_warning = gtk_check_version(GTK_MAJOR_VERSION,
 						GTK_MINOR_VERSION,
@@ -441,7 +441,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int widt
 //    const char *gllibname = null;
 
 	llinfos << "createContext, fullscreen=" << fullscreen <<
-	    " size=" << width << "x" << height << llendl;
+	    " size=" << width << "x" << height << "@" << bits << llendl;
 
 	// captures don't survive contexts
 	mGrabbyKeyFlags = 0;
@@ -501,7 +501,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int widt
 	SDL_GL_SetAttribute(SDL_GL_RED_SIZE,  8);
 	SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE,8);
 	SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
-#if !LL_SOLARIS
+#if !LL_SOLARIS && !defined(__OpenBSD__)
         SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, (bits <= 16) ? 16 : 24);
 #else
 	// NOTE- use smaller Z-buffer to enable more graphics cards
@@ -529,6 +529,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int widt
 	int sdlflags = SDL_OPENGL | SDL_RESIZABLE | SDL_ANYFORMAT;
 
 	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+	//SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0);
 
     	mSDLFlags = sdlflags;
 
@@ -626,6 +627,7 @@ BOOL LLWindowSDL::createContext(int x, int y, int widt
 		    width = 768;
 
 		llinfos << "createContext: creating window " << width << "x" << height << "x" << bits << llendl;
+		// sdlflags = SDL_RESIZABLE;
 		mWindow = SDL_SetVideoMode(width, height, bits, sdlflags);
 
 		if (!mWindow)
@@ -788,6 +790,7 @@ void LLWindowSDL::destroyContext()
 
 LLWindowSDL::~LLWindowSDL()
 {
+	llinfos << "~LLWindowSDL begins" << llendl;
 	quitCursors();
 	destroyContext();
 
@@ -2695,7 +2698,7 @@ void spawn_web_browser(const char* escaped_url)
 {
 	llinfos << "spawn_web_browser: " << escaped_url << llendl;
 	
-#if LL_LINUX || LL_SOLARIS
+#if LL_LINUX || LL_SOLARIS || defined(__OpenBSD__)
 # if LL_X11
 	if (gWindowImplementation && gWindowImplementation->mSDL_Display)
 	{
