diff --git a/configure b/configure index 4363500..82619e2 100755 --- a/configure +++ b/configure @@ -24440,6 +24440,62 @@ fi _ACEOF fi + { echo "$as_me:$LINENO: checking for const parameter to _XData32" >&5 +echo $ECHO_N "checking for const parameter to _XData32... $ECHO_C" >&6; } + have_const_param_xdata32=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + extern int _XData32(Display *dpy,register _Xconst long *data,unsigned len); + +int +main () +{ + + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + have_const_param_xdata32=yes + cat >>confdefs.h <<\_ACEOF +#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XDATA32 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { echo "$as_me:$LINENO: result: $have_const_param_xdata32" >&5 +echo "${ECHO_T}$have_const_param_xdata32" >&6; } fi fi } diff --git a/configure.in b/configure.in index 08c8e1e..89c526d 100644 --- a/configure.in +++ b/configure.in @@ -1127,6 +1127,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 + 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 } diff --git a/include/SDL_config.h.in b/include/SDL_config.h.in index 8bb1773..78ca747 100644 --- a/include/SDL_config.h.in +++ b/include/SDL_config.h.in @@ -282,6 +282,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 diff --git a/src/video/quartz/SDL_QuartzVideo.h b/src/video/quartz/SDL_QuartzVideo.h index 7506e0c..425896f 100644 --- a/src/video/quartz/SDL_QuartzVideo.h +++ b/src/video/quartz/SDL_QuartzVideo.h @@ -91,7 +91,9 @@ typedef struct SDL_PrivateVideoData { CGDirectDisplayID display; /* 0 == main display (only support single display) */ const void *mode; /* current mode of the display */ const void *save_mode; /* original mode of the display */ +#if (MAC_OS_X_VERSION_MIN_REQUIRED < 1070) CGDirectPaletteRef palette; /* palette of an 8-bit display */ +#endif NSOpenGLContext *gl_context; /* OpenGL rendering context */ NSGraphicsContext *nsgfx_context; /* Cocoa graphics context */ Uint32 width, height, bpp; /* frequently used data about the display */ diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h index 4875b98..bd83f7f 100644 --- a/src/video/x11/SDL_x11sym.h +++ b/src/video/x11/SDL_x11sym.h @@ -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