[Top][All Lists]

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

Build failure in xterm.c

From: Vin Shelton
Subject: Build failure in xterm.c
Date: Thu, 26 Jun 2003 00:00:38 -0400

Sorry if this has already been discussed, but I couldn't find any
reference to it in the archive of the mailinglist.

Using the latest CVS sources, xterm.c will not build for me.  I'm
getting the following error:

gcc -c -D_BSD_SOURCE  -I/usr/local/include -Demacs -DHAVE_CONFIG_H -DUSE_LUCID  
-I. -I/opt/src/emacs-2003-06-25/src -D_BSD_SOURCE -g -O2 
/opt/src/emacs-2003-06-25/src/xterm.c: In function `xim_initialize':
/opt/src/emacs-2003-06-25/src/xterm.c:8126: error: 
`XRegisterIMInstantiateCallback_arg6' undeclared (first use in this function)
/opt/src/emacs-2003-06-25/src/xterm.c:8126: error: (Each undeclared identifier 
is reported only once
/opt/src/emacs-2003-06-25/src/xterm.c:8126: error: for each function it appears 
/opt/src/emacs-2003-06-25/src/xterm.c:8126: error: parse error before "xim_inst"
make: *** [xterm.o] Error 1

This is because the necessary definition was not added to
src/config.in when configure.in was modified to generate the
appropriate type for XRegisterIMInstantiateCallback_arg6.  I've
attached a patch for this problem.

However, the configure test itself is wrong.  It purports to
differentiate between systems which require XPointer as the final
argument to XRegisterIMInstantiateCallback and those which require
XPointer*.  My system requires an XPointer (witness these lines from

extern Bool XRegisterIMInstantiateCallback(
#if NeedFunctionPrototypes
    Display*                    /* dpy */,
    struct _XrmHashBucketRec*   /* rdb */,
    char*                       /* res_name */,
    char*                       /* res_class */,
    XIDProc                     /* callback */,
    XPointer                    /* client_data */

yet the configure test reports that I need XPointer*.  The reason for
this is that gcc only generates a warning on the incorrect argument
type, but still compiles the conftest code and generates an object
file.  Here is the relevant output from my config.log file:

configure:8917: gcc -c   -O2  -D_BSD_SOURCE  -I/usr/local/include conftest.c >&5
configure: In function `main':
configure:8978: warning: passing arg 5 of `XRegisterIMInstantiateCallback' from 
incompatible pointer type
configure:8978: warning: passing arg 6 of `XRegisterIMInstantiateCallback' from 
incompatible pointer type
configure:8920: $? = 0
configure:8923: test -s conftest.o
configure:8926: $? = 0

and if you look at the definitions at the end of config.log you'll

#define XRegisterIMInstantiateCallback_arg6 XPointer*

Here is the patch for src/config.in:

ChangeLog entry for src/ChangeLog:
2003-06-25  Vin Shelton  <address@hidden>

        * config.in: Add definition for

Index: src/config.in
RCS file: /cvsroot/emacs/emacs/src/config.in,v
retrieving revision 1.187
diff -a -u -r1.187 config.in
--- src/config.in       6 Jun 2003 10:16:42 -0000       1.187
+++ src/config.in       26 Jun 2003 03:52:27 -0000
@@ -615,6 +615,10 @@
 /* Define to 1 if you have the XkbGetKeyboard function. */
+/* Define the appropriate type for the 6th argument
+   to the XRegisterIMInstantiateCallback function */
+#undef XRegisterIMInstantiateCallback_arg6
 /* Define to 1 if you have the Xpm libary (-lXpm). */
 #undef HAVE_XPM

  Vin Shelton

reply via email to

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