$OpenBSD: patch-display_xf86dga_XF86VMode_c,v 1.4 2010/04/29 19:50:14 matthieu Exp $
--- display/xf86dga/XF86VMode.c.orig	Sat Sep 18 12:50:34 2004
+++ display/xf86dga/XF86VMode.c	Tue Apr 27 23:29:50 2010
@@ -1,4 +1,4 @@
-/* $Id: patch-display_xf86dga_XF86VMode_c,v 1.4 2010/04/29 19:50:14 matthieu Exp $
+/* $Id: patch-display_xf86dga_XF86VMode_c,v 1.4 2010/04/29 19:50:14 matthieu Exp $
 
 This is a modified version of the XF86VMode API functions for use
 internally by the LibGGI xf86dga target.  Mods by Marcus Sundberg and
@@ -55,7 +55,8 @@ from Kaleb S. KEITHLEY.
 #define NEED_EVENTS
 #define NEED_REPLIES
 #include <X11/Xlibint.h>
-#include <X11/extensions/xf86vmstr.h>
+#include <X11/extensions/xf86vmproto.h>
+#include <X11/extensions/xf86vmode.h>
 #include <X11/extensions/Xext.h>
 #include "extutil.h"
 
@@ -79,7 +80,8 @@ static char *xf86vidmode_extension_name = XF86VIDMODEN
  *                                                                           *
  *****************************************************************************/
 
-static int close_display();
+static XEXT_GENERATE_CLOSE_DISPLAY(close_display, xf86vidmode_info)
+
 static /* const */ XExtensionHooks xf86vidmode_extension_hooks = {
 	NULL,			/* create_gc */
 	NULL,			/* copy_gc */
@@ -98,17 +100,32 @@ static XEXT_GENERATE_FIND_DISPLAY(find_display, xf86vi
 				  xf86vidmode_extension_name,
 				  &xf86vidmode_extension_hooks, 0, NULL)
 
-static XEXT_GENERATE_CLOSE_DISPLAY(close_display, xf86vidmode_info)
-
-
 /*****************************************************************************
  *                                                                           *
  *		    public XFree86-VidMode Extension routines                *
  *                                                                           *
  *****************************************************************************/
- static Bool _ggi_XF86VidModeQueryExtension(Display * dpy,
-					    int *event_basep,
-					    int *error_basep)
+/* prototypes added to suppress compiler warnings */
+Bool _ggi_XF86VidModeQueryExtension(Display * dpy,
+				    int *event_basep, int *error_basep);
+Bool _ggi_XF86VidModeSetClientVersion(Display * dpy);
+Bool _ggi_XF86VidModeQueryVersion(Display * dpy, int *majorVersion,
+				  int *minorVersion);
+Bool _ggi_XF86VidModeSetGamma(Display * dpy,
+			      int screen, XF86VidModeGamma * Gamma);
+Bool _ggi_XF86VidModeGetGamma(Display * dpy,
+			      int screen, XF86VidModeGamma * Gamma);
+Bool _ggi_XF86VidModeGetAllModeLines(Display * dpy, int screen,
+				     int *modecount,
+				     XF86VidModeModeInfo *** modelinesPtr);
+Bool _ggi_XF86VidModeSwitchToMode(Display * dpy, int screen,
+				  XF86VidModeModeInfo * modeline);
+Bool _ggi_XF86VidModeLockModeSwitch(Display * dpy, int screen, int lock);
+Bool _ggi_XF86VidModeSetViewPort(Display * dpy, int screen, int x, int y);
+
+
+Bool _ggi_XF86VidModeQueryExtension(Display * dpy,
+				    int *event_basep, int *error_basep)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 
@@ -122,7 +139,7 @@ static XEXT_GENERATE_CLOSE_DISPLAY(close_display, xf86
 }
 
 
-static Bool _ggi_XF86VidModeSetClientVersion(Display * dpy)
+Bool _ggi_XF86VidModeSetClientVersion(Display * dpy)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeSetClientVersionReq *req;
@@ -141,8 +158,8 @@ static Bool _ggi_XF86VidModeSetClientVersion(Display *
 }
 
 
-static Bool _ggi_XF86VidModeQueryVersion(Display * dpy, int *majorVersion,
-					 int *minorVersion)
+Bool _ggi_XF86VidModeQueryVersion(Display * dpy, int *majorVersion,
+				  int *minorVersion)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeQueryVersionReply rep;
@@ -168,8 +185,8 @@ static Bool _ggi_XF86VidModeQueryVersion(Display * dpy
 	return True;
 }
 
-static Bool _ggi_XF86VidModeSetGamma(Display * dpy,
-				     int screen, XF86VidModeGamma * Gamma)
+Bool _ggi_XF86VidModeSetGamma(Display * dpy,
+			      int screen, XF86VidModeGamma * Gamma)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeSetGammaReq *req;
@@ -190,8 +207,8 @@ static Bool _ggi_XF86VidModeSetGamma(Display * dpy,
 }
 
 
-static Bool _ggi_XF86VidModeGetGamma(Display * dpy,
-				     int screen, XF86VidModeGamma * Gamma)
+Bool _ggi_XF86VidModeGetGamma(Display * dpy,
+			      int screen, XF86VidModeGamma * Gamma)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeGetGammaReply rep;
@@ -219,10 +236,9 @@ static Bool _ggi_XF86VidModeGetGamma(Display * dpy,
 
 /* We don't need XF86VidModeGetModeLine */
 
-static Bool _ggi_XF86VidModeGetAllModeLines(Display * dpy, int screen,
-					    int *modecount,
-					    XF86VidModeModeInfo ***
-					    modelinesPtr)
+Bool _ggi_XF86VidModeGetAllModeLines(Display * dpy, int screen,
+				     int *modecount,
+				     XF86VidModeModeInfo *** modelinesPtr)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeGetAllModeLinesReply rep;
@@ -322,8 +338,7 @@ static Bool _ggi_XF86VidModeGetAllModeLines(Display * 
 						Xfree(modelines[i]->
 						      private);
 					} else {
-						_XRead32(dpy,
-							 (char *)
+						_XRead32(dpy, (char *)
 							 modelines[i]->
 							 private,
 							 oldxmdline.
@@ -364,8 +379,7 @@ static Bool _ggi_XF86VidModeGetAllModeLines(Display * 
 						Xfree(modelines[i]->
 						      private);
 					} else {
-						_XRead(dpy,
-						       (char *)
+						_XRead(dpy, (char *)
 						       modelines[i]->
 						       private,
 						       xmdline.privsize *
@@ -415,8 +429,8 @@ static Bool _ggi_XF86VidModeGetAllModeLines(Display * 
  * bother with those functions.  
  */
 
-static Bool _ggi_XF86VidModeSwitchToMode(Display * dpy, int screen,
-					 XF86VidModeModeInfo * modeline)
+Bool _ggi_XF86VidModeSwitchToMode(Display * dpy, int screen,
+				  XF86VidModeModeInfo * modeline)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeSwitchToModeReq *req;
@@ -498,8 +512,7 @@ static Bool _ggi_XF86VidModeSwitchToMode(Display * dpy
 }
 
 
-static Bool _ggi_XF86VidModeLockModeSwitch(Display * dpy, int screen,
-					   int lock)
+Bool _ggi_XF86VidModeLockModeSwitch(Display * dpy, int screen, int lock)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeLockModeSwitchReq *req;
@@ -518,8 +531,7 @@ static Bool _ggi_XF86VidModeLockModeSwitch(Display * d
 }
 
 
-static Bool _ggi_XF86VidModeSetViewPort(Display * dpy, int screen,
-					int x, int y)
+Bool _ggi_XF86VidModeSetViewPort(Display * dpy, int screen, int x, int y)
 {
 	XExtDisplayInfo *info = find_display(dpy);
 	xXF86VidModeSetViewPortReq *req;
