From 39fd9b94bdb90d37ff44f6f7b6931c5ea844e6f2 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 4 Jan 2006 22:57:50 +0000 Subject: [PATCH] More dynamic X11 fixes...catches some code in Xlib headers that caused dependencies... --- src/video/Xext/Xinerama/Xinerama.c | 6 ------ src/video/Xext/Xv/Xv.c | 6 ------ src/video/Xext/Xxf86dga/XF86DGA.c | 6 ------ src/video/Xext/Xxf86dga/XF86DGA2.c | 6 ------ src/video/Xext/Xxf86vm/XF86VMode.c | 6 ------ src/video/x11/SDL_x11dyn.c | 1 + src/video/x11/SDL_x11dyn.h | 9 +++++++++ src/video/x11/SDL_x11sym.h | 2 ++ 8 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/video/Xext/Xinerama/Xinerama.c b/src/video/Xext/Xinerama/Xinerama.c index a9a3837eb..2aa872d8f 100644 --- a/src/video/Xext/Xinerama/Xinerama.c +++ b/src/video/Xext/Xinerama/Xinerama.c @@ -37,12 +37,6 @@ Equipment Corporation. #include "../../x11/SDL_x11dyn.h" -/* Workaround code in headers... */ -#define _XFlush p_XFlush -#define _XFlushGCCache p_XFlushGCCache -#define _XReply p_XReply -#define _XSend p_XSend - static XExtensionInfo _panoramiX_ext_info_data; static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data; static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME; diff --git a/src/video/Xext/Xv/Xv.c b/src/video/Xext/Xv/Xv.c index 68c315ea7..7fc6c0138 100644 --- a/src/video/Xext/Xv/Xv.c +++ b/src/video/Xext/Xv/Xv.c @@ -58,12 +58,6 @@ SOFTWARE. #include "../../x11/SDL_x11dyn.h" -/* Workaround code in headers... */ -#define _XFlush p_XFlush -#define _XFlushGCCache p_XFlushGCCache -#define _XReply p_XReply -#define _XSend p_XSend - static XExtensionInfo _xv_info_data; static XExtensionInfo *xv_info = &_xv_info_data; static char *xv_extension_name = XvName; diff --git a/src/video/Xext/Xxf86dga/XF86DGA.c b/src/video/Xext/Xxf86dga/XF86DGA.c index e66fee4ba..727971aa7 100644 --- a/src/video/Xext/Xxf86dga/XF86DGA.c +++ b/src/video/Xext/Xxf86dga/XF86DGA.c @@ -66,12 +66,6 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc #include "../../x11/SDL_x11dyn.h" -/* Workaround code in headers... */ -#define _XFlush p_XFlush -#define _XFlushGCCache p_XFlushGCCache -#define _XReply p_XReply -#define _XSend p_XSend - extern XExtDisplayInfo* SDL_NAME(xdga_find_display)(Display*); extern char *SDL_NAME(xdga_extension_name); diff --git a/src/video/Xext/Xxf86dga/XF86DGA2.c b/src/video/Xext/Xxf86dga/XF86DGA2.c index ceae16446..e19742eab 100644 --- a/src/video/Xext/Xxf86dga/XF86DGA2.c +++ b/src/video/Xext/Xxf86dga/XF86DGA2.c @@ -30,12 +30,6 @@ Copyright (c) 1995,1996 The XFree86 Project, Inc #include "../../x11/SDL_x11dyn.h" -/* Workaround code in headers... */ -#define _XFlush p_XFlush -#define _XFlushGCCache p_XFlushGCCache -#define _XReply p_XReply -#define _XSend p_XSend - /* If you change this, change the Bases[] array below as well */ #define MAX_HEADS 16 diff --git a/src/video/Xext/Xxf86vm/XF86VMode.c b/src/video/Xext/Xxf86vm/XF86VMode.c index adb391d3b..b068ecb84 100644 --- a/src/video/Xext/Xxf86vm/XF86VMode.c +++ b/src/video/Xext/Xxf86vm/XF86VMode.c @@ -49,12 +49,6 @@ from Kaleb S. KEITHLEY. #include "../../x11/SDL_x11dyn.h" -/* Workaround code in headers... */ -#define _XFlush p_XFlush -#define _XFlushGCCache p_XFlushGCCache -#define _XReply p_XReply -#define _XSend p_XSend - #ifdef DEBUG #include #endif diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c index 807d75653..347c7d19f 100644 --- a/src/video/x11/SDL_x11dyn.c +++ b/src/video/x11/SDL_x11dyn.c @@ -22,6 +22,7 @@ /*#define DEBUG_DYNAMIC_X11 1*/ +#define __SDL_NO_REDEFINE_X11_HEADER_SYMS 1 #include "SDL_x11dyn.h" #ifdef DEBUG_DYNAMIC_X11 diff --git a/src/video/x11/SDL_x11dyn.h b/src/video/x11/SDL_x11dyn.h index 374d951bc..0b04b3474 100644 --- a/src/video/x11/SDL_x11dyn.h +++ b/src/video/x11/SDL_x11dyn.h @@ -65,6 +65,15 @@ typedef Status (*SDL_X11_XESetEventToWireRetType)(Display*,XEvent*,xEvent*); /* Macro in the xlib headers, not an actual symbol... */ #define pXDestroyImage XDestroyImage +/* Workaround code in headers... */ +#if !__SDL_NO_REDEFINE_X11_HEADER_SYMS +#define _XFlush p_XFlush +#define _XFlushGCCache p_XFlushGCCache +#define _XReply p_XReply +#define _XSend p_XSend +#define _XData32 p_XData32 +#endif + int SDL_X11_LoadSymbols(void); void SDL_X11_UnloadSymbols(void); diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h index 7133cbeac..46775aeac 100644 --- a/src/video/x11/SDL_x11sym.h +++ b/src/video/x11/SDL_x11sym.h @@ -130,6 +130,8 @@ SDL_X11_SYM(void,_XReadPad,(Display*,char*,long)) SDL_X11_SYM(void,_XSend,(Display*,_Xconst char*,long)) SDL_X11_SYM(Status,_XReply,(Display*,xReply*,int,Bool)) SDL_X11_SYM(unsigned long,_XSetLastRequestRead,(Display*,xGenericReply*)) +SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len)) +SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len)) #if NeedWidePrototypes SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display*,unsigned int,int))