1 |
chainsaw 13/06/02 20:33:18 |
2 |
|
3 |
Added: libsdl-1.2.15-const-xdata32.patch |
4 |
Log: |
5 |
Patch by Azamat H. Hackimov to address build failures against recent libX11, closes bug #471300. |
6 |
|
7 |
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-libs/libsdl/files/libsdl-1.2.15-const-xdata32.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: libsdl-1.2.15-const-xdata32.patch |
16 |
=================================================================== |
17 |
# HG changeset patch |
18 |
# User Azamat H. Hackimov <azamat.hackimov@×××××.com> |
19 |
# Date 1370184533 -21600 |
20 |
# Branch SDL-1.2 |
21 |
# Node ID 91ad7b43317a6387e115ecdf63a49137f47e42c8 |
22 |
# Parent f7fd5c3951b9ed922fdf696f7182e71b58a13268 |
23 |
Fix compilation with libX11 >= 1.5.99.902. |
24 |
|
25 |
These changes fixes bug #1769 for SDL 1.2 |
26 |
(http://bugzilla.libsdl.org/show_bug.cgi?id=1769). |
27 |
|
28 |
diff -r f7fd5c3951b9 -r 91ad7b43317a configure.in |
29 |
--- a/configure.in Wed Apr 17 00:56:53 2013 -0700 |
30 |
+++ b/configure.in Sun Jun 02 20:48:53 2013 +0600 |
31 |
@@ -1169,6 +1169,17 @@ |
32 |
if test x$definitely_enable_video_x11_xrandr = xyes; then |
33 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR) |
34 |
fi |
35 |
+ AC_MSG_CHECKING(for const parameter to _XData32) |
36 |
+ have_const_param_xdata32=no |
37 |
+ AC_TRY_COMPILE([ |
38 |
+ #include <X11/Xlibint.h> |
39 |
+ extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len); |
40 |
+ ],[ |
41 |
+ ],[ |
42 |
+ have_const_param_xdata32=yes |
43 |
+ AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32) |
44 |
+ ]) |
45 |
+ AC_MSG_RESULT($have_const_param_xdata32) |
46 |
fi |
47 |
fi |
48 |
} |
49 |
diff -r f7fd5c3951b9 -r 91ad7b43317a include/SDL_config.h.in |
50 |
--- a/include/SDL_config.h.in Wed Apr 17 00:56:53 2013 -0700 |
51 |
+++ b/include/SDL_config.h.in Sun Jun 02 20:48:53 2013 +0600 |
52 |
@@ -283,6 +283,7 @@ |
53 |
#undef SDL_VIDEO_DRIVER_WINDIB |
54 |
#undef SDL_VIDEO_DRIVER_WSCONS |
55 |
#undef SDL_VIDEO_DRIVER_X11 |
56 |
+#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 |
57 |
#undef SDL_VIDEO_DRIVER_X11_DGAMOUSE |
58 |
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC |
59 |
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT |
60 |
diff -r f7fd5c3951b9 -r 91ad7b43317a src/video/x11/SDL_x11sym.h |
61 |
--- a/src/video/x11/SDL_x11sym.h Wed Apr 17 00:56:53 2013 -0700 |
62 |
+++ b/src/video/x11/SDL_x11sym.h Sun Jun 02 20:48:53 2013 +0600 |
63 |
@@ -165,7 +165,11 @@ |
64 |
*/ |
65 |
#ifdef LONG64 |
66 |
SDL_X11_MODULE(IO_32BIT) |
67 |
+#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 |
68 |
+SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return) |
69 |
+#else |
70 |
SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return) |
71 |
+#endif |
72 |
SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),) |
73 |
#endif |