emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 1f5f3b7e89: Remove non-functional configure test


From: Po Lu
Subject: master 1f5f3b7e89: Remove non-functional configure test
Date: Fri, 14 Jan 2022 20:13:54 -0500 (EST)

branch: master
commit 1f5f3b7e8955154c28342e63ba1216f83ff6d73d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    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.
---
 configure.ac | 35 -----------------------------------
 src/xterm.c  | 11 ++++++-----
 2 files changed, 6 insertions(+), 40 deletions(-)

diff --git a/configure.ac b/configure.ac
index baf8c8018e..955f0918fd 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 <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
diff --git a/src/xterm.c b/src/xterm.c
index ec415f5ffa..103eb75a46 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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]