1sdl: Fix compilation with libX11 >= 1.5.99.902 2Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> 3 4# HG changeset patch 5# User Azamat H. Hackimov <azamat.hackimov@gmail.com> 6# Date 1370184533 -21600 7# Node ID 91ad7b43317a6387e115ecdf63a49137f47e42c8 8# Parent f7fd5c3951b9ed922fdf696f7182e71b58a13268 9Fix compilation with libX11 >= 1.5.99.902. 10 11These changes fixes bug #1769 for SDL 1.2 12(http://bugzilla.libsdl.org/show_bug.cgi?id=1769). 13 14diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in 15--- a/configure.in Wed Apr 17 00:56:53 2013 -0700 16+++ b/configure.in Sun Jun 02 20:48:53 2013 +0600 17@@ -1169,6 +1169,17 @@ 18 if test x$definitely_enable_video_x11_xrandr = xyes; then 19 AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR) 20 fi 21+ AC_MSG_CHECKING(for const parameter to _XData32) 22+ have_const_param_xdata32=no 23+ AC_TRY_COMPILE([ 24+ #include <X11/Xlibint.h> 25+ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len); 26+ ],[ 27+ ],[ 28+ have_const_param_xdata32=yes 29+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32) 30+ ]) 31+ AC_MSG_RESULT($have_const_param_xdata32) 32 fi 33 fi 34 } 35diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in 36--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700 37+++ b/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600 38@@ -283,6 +283,7 @@ 39 #undef SDL_VIDEO_DRIVER_WINDIB 40 #undef SDL_VIDEO_DRIVER_WSCONS 41 #undef SDL_VIDEO_DRIVER_X11 42+#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 43 #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE 44 #undef SDL_VIDEO_DRIVER_X11_DYNAMIC 45 #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT 46diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h 47--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700 48+++ b/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600 49@@ -165,7 +165,11 @@ 50 */ 51 #ifdef LONG64 52 SDL_X11_MODULE(IO_32BIT) 53+#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 54+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return) 55+#else 56 SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) 57+#endif 58 SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) 59 #endif 60 61