From 203b2445d31657aa4d9b72b80b95a4ac71bbe1ba Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Fri, 13 Jan 2006 01:08:39 +0000 Subject: [PATCH] More dynamic X11 work. --- src/video/x11/SDL_x11dyn.h | 1 + src/video/x11/SDL_x11sym.h | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/video/x11/SDL_x11dyn.h b/src/video/x11/SDL_x11dyn.h index 9bf83498a..47d9e9838 100644 --- a/src/video/x11/SDL_x11dyn.h +++ b/src/video/x11/SDL_x11dyn.h @@ -72,6 +72,7 @@ typedef Status (*SDL_X11_XESetEventToWireRetType)(Display*,XEvent*,xEvent*); #define _XReply p_XReply #define _XSend p_XSend #define _XData32 p_XData32 +#define XFree pXFree #endif int SDL_X11_LoadSymbols(void); diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h index 0ad953ddb..1c88933fd 100644 --- a/src/video/x11/SDL_x11sym.h +++ b/src/video/x11/SDL_x11sym.h @@ -112,6 +112,8 @@ SDL_X11_SYM(1,XExtensionInfo*,XextCreateExtension,(void)) SDL_X11_SYM(1,void,XextDestroyExtension,(XExtensionInfo*)) SDL_X11_SYM(1,XExtDisplayInfo*,XextFindDisplay,(XExtensionInfo*,Display*)) SDL_X11_SYM(1,int,XextRemoveDisplay,(XExtensionInfo*,Display*)) +SDL_X11_SYM(1,Bool,XQueryExtension,(Display*,_Xconst char*,int*,int*,int*)) + #ifdef X_HAVE_UTF8_STRING SDL_X11_SYM(1,int,Xutf8TextListToTextProperty,(Display*,char**,int,XICCEncodingStyle,XTextProperty*)) SDL_X11_SYM(1,int,Xutf8LookupString,(XIC,XKeyPressedEvent*,char*,int,KeySym*,Status*)) @@ -130,8 +132,15 @@ SDL_X11_SYM(1,void,_XReadPad,(Display*,char*,long)) SDL_X11_SYM(1,void,_XSend,(Display*,_Xconst char*,long)) SDL_X11_SYM(1,Status,_XReply,(Display*,xReply*,int,Bool)) SDL_X11_SYM(1,unsigned long,_XSetLastRequestRead,(Display*,xGenericReply*)) -SDL_X11_SYM(0,int,_XData32,(Display *dpy,register long *data,unsigned len)) -SDL_X11_SYM(0,void,_XRead32,(Display *dpy,register long *data,long len)) + +/* + * These don't exist in 32-bit versions and are removed by Xlib macros, but + * 64+ bit systems will use them. + */ +#ifdef LONG64 +SDL_X11_SYM(1,int,_XData32,(Display *dpy,register long *data,unsigned len)) +SDL_X11_SYM(1,void,_XRead32,(Display *dpy,register long *data,long len)) +#endif #if NeedWidePrototypes SDL_X11_SYM(1,KeySym,XKeycodeToKeysym,(Display*,unsigned int,int))