]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove non-functional configure test
authorPo Lu <luangruo@yahoo.com>
Sat, 15 Jan 2022 01:11:11 +0000 (09:11 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 15 Jan 2022 01:11:11 +0000 (09:11 +0800)
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.

configure.ac
src/xterm.c

index baf8c8018ecfbfbfad7f343008d6286cd3ff47c0..955f0918fd4f0d3fb4b9fcde64f47c3121d18348 100644 (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
index ec415f5ffaf7661f79f07e9d23ff3bc18c04b125..103eb75a4607ce2b0050d91e9616a222bf518700 100644 (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);