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.
This commit is contained in:
Po Lu 2022-01-15 09:11:11 +08:00
parent 0e20d76a38
commit 1f5f3b7e89
2 changed files with 6 additions and 40 deletions

View file

@ -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 <X11/Xlib.h>
#include <X11/Xresource.h>]],
[[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

View file

@ -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);