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