Fix compilation with libX11 >= 1.5.99.902. SDL-1.2
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>
Sun, 02 Jun 2013 20:48:53 +0600
branchSDL-1.2
changeset 729191ad7b43317a
parent 7069 f7fd5c3951b9
child 7411 14827e7e4d92
Fix compilation with libX11 >= 1.5.99.902.

These changes fixes bug #1769 for SDL 1.2
(http://bugzilla.libsdl.org/show_bug.cgi?id=1769).
configure.in
include/SDL_config.h.in
src/video/x11/SDL_x11sym.h
     1.1 --- a/configure.in	Wed Apr 17 00:56:53 2013 -0700
     1.2 +++ b/configure.in	Sun Jun 02 20:48:53 2013 +0600
     1.3 @@ -1169,6 +1169,17 @@
     1.4              if test x$definitely_enable_video_x11_xrandr = xyes; then
     1.5                  AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
     1.6              fi
     1.7 +            AC_MSG_CHECKING(for const parameter to _XData32)
     1.8 +            have_const_param_xdata32=no
     1.9 +            AC_TRY_COMPILE([
    1.10 +              #include <X11/Xlibint.h>
    1.11 +              extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
    1.12 +            ],[
    1.13 +            ],[
    1.14 +            have_const_param_xdata32=yes
    1.15 +            AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
    1.16 +            ])
    1.17 +            AC_MSG_RESULT($have_const_param_xdata32)
    1.18          fi
    1.19      fi
    1.20  }
     2.1 --- a/include/SDL_config.h.in	Wed Apr 17 00:56:53 2013 -0700
     2.2 +++ b/include/SDL_config.h.in	Sun Jun 02 20:48:53 2013 +0600
     2.3 @@ -283,6 +283,7 @@
     2.4  #undef SDL_VIDEO_DRIVER_WINDIB
     2.5  #undef SDL_VIDEO_DRIVER_WSCONS
     2.6  #undef SDL_VIDEO_DRIVER_X11
     2.7 +#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
     2.8  #undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
     2.9  #undef SDL_VIDEO_DRIVER_X11_DYNAMIC
    2.10  #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
     3.1 --- a/src/video/x11/SDL_x11sym.h	Wed Apr 17 00:56:53 2013 -0700
     3.2 +++ b/src/video/x11/SDL_x11sym.h	Sun Jun 02 20:48:53 2013 +0600
     3.3 @@ -165,7 +165,11 @@
     3.4   */
     3.5  #ifdef LONG64
     3.6  SDL_X11_MODULE(IO_32BIT)
     3.7 +#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
     3.8 +SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
     3.9 +#else
    3.10  SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
    3.11 +#endif
    3.12  SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
    3.13  #endif
    3.14