0002-fix-compilation-with-libx11.patch 2.3 KB

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