From: Po Lu Date: Sat, 15 Jan 2022 01:11:11 +0000 (+0800) Subject: Remove non-functional configure test X-Git-Tag: emacs-29.0.90~3045 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1f5f3b7e8955154c28342e63ba1216f83ff6d73d;p=emacs.git Remove non-functional configure test It cannot work anymore, leading to compiler warnings when building xterm.c. * configure.ac: Remove test for whether XRegisterIMInstantiateCallback wants XPointer or XPointer * as the client_data. * src/xterm.c (xim_initialize): (xim_close_dpy): Just cast client data to void * and hope that the compiler keeps quiet. --- diff --git a/configure.ac b/configure.ac index baf8c8018ec..955f0918fd4 100644 --- a/configure.ac +++ b/configure.ac @@ -3409,41 +3409,6 @@ if test "${with_xim}" != "no"; then [Define to 1 to default runtime use of XIM to on.]) fi - -if test "${HAVE_XIM}" != "no"; then - late_CFLAGS=$CFLAGS - if test "$GCC" = yes; then - CFLAGS="$CFLAGS --pedantic-errors" - fi - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include ]], -[[Display *display; -XrmDatabase db; -char *res_name; -char *res_class; -XIDProc *callback; -XPointer *client_data; -#ifndef __GNUC__ -/* If we're not using GCC, it's probably not XFree86, and this is - probably right, but we can't use something like --pedantic-errors. */ -extern Bool XRegisterIMInstantiateCallback(Display*, XrmDatabase, char*, - char*, XIMProc, XPointer*); -#endif -(void)XRegisterIMInstantiateCallback(display, db, res_name, res_class, callback, - client_data);]])], - [emacs_cv_arg6_star=yes]) - AH_TEMPLATE(XRegisterIMInstantiateCallback_arg6, - [Define to the type of the 6th arg of XRegisterIMInstantiateCallback, -either XPointer or XPointer*.])dnl - if test "$emacs_cv_arg6_star" = yes; then - AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer*]) - else - AC_DEFINE(XRegisterIMInstantiateCallback_arg6, [XPointer]) - fi - CFLAGS=$late_CFLAGS -fi - # Check for XRender HAVE_XRENDER=no if test "${HAVE_X11}" = "yes"; then diff --git a/src/xterm.c b/src/xterm.c index ec415f5ffaf..103eb75a460 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -12698,9 +12698,11 @@ xim_initialize (struct x_display_info *dpyinfo, char *resource_name) ret = XRegisterIMInstantiateCallback (dpyinfo->display, dpyinfo->rdb, xim_inst->resource_name, emacs_class, xim_instantiate_callback, - /* This is XPointer in XFree86 but (XPointer *) - on Tru64, at least, hence the configure test. */ - (XRegisterIMInstantiateCallback_arg6) xim_inst); + /* This is XPointer in XFree86 but (XPointer *) on Tru64, at + least, but the configure test doesn't work because + xim_instantiate_callback can either be XIMProc or + XIDProc, so just cast to void *. */ + (void *) xim_inst); eassert (ret == True); #else /* not HAVE_X11R6_XIM */ xim_open_dpy (dpyinfo, resource_name); @@ -12725,8 +12727,7 @@ xim_close_dpy (struct x_display_info *dpyinfo) { Bool ret = XUnregisterIMInstantiateCallback (dpyinfo->display, dpyinfo->rdb, xim_inst->resource_name, - emacs_class, xim_instantiate_callback, - (XRegisterIMInstantiateCallback_arg6) xim_inst); + emacs_class, xim_instantiate_callback, (void *) xim_inst); eassert (ret == True); } xfree (xim_inst->resource_name);