Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
winterheart committed Jun 2, 2013
1 parent ecc753f commit 5d79977
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
11 changes: 11 additions & 0 deletions configure.in
Expand Up @@ -1169,6 +1169,17 @@ AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for ful
if test x$definitely_enable_video_x11_xrandr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
fi
AC_MSG_CHECKING(for const parameter to _XData32)
have_const_param_xdata32=no
AC_TRY_COMPILE([
#include <X11/Xlibint.h>
extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len);
],[
],[
have_const_param_xdata32=yes
AC_DEFINE(SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32)
])
AC_MSG_RESULT($have_const_param_xdata32)
fi
fi
}
Expand Down
1 change: 1 addition & 0 deletions include/SDL_config.h.in
Expand Up @@ -283,6 +283,7 @@
#undef SDL_VIDEO_DRIVER_WINDIB
#undef SDL_VIDEO_DRIVER_WSCONS
#undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
#undef SDL_VIDEO_DRIVER_X11_DGAMOUSE
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
Expand Down
4 changes: 4 additions & 0 deletions src/video/x11/SDL_x11sym.h
Expand Up @@ -165,7 +165,11 @@ SDL_X11_SYM(Bool,XShmQueryExtension,(Display* a),(a),return)
*/
#ifdef LONG64
SDL_X11_MODULE(IO_32BIT)
#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32
SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
#else
SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
#endif
SDL_X11_SYM(void,_XRead32,(Display *dpy,register long *data,long len),(dpy,data,len),)
#endif

Expand Down

0 comments on commit 5d79977

Please sign in to comment.