all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vin Shelton <acs@xemacs.org>
Subject: Build failure in xterm.c
Date: Thu, 26 Jun 2003 00:00:38 -0400	[thread overview]
Message-ID: <m2k7b94heh.fsf@zion.rcn.com> (raw)

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
/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 in.)
/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
/usr/include/X11/Xlib.h:

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

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
see:

#define XRegisterIMInstantiateCallback_arg6 XPointer*


Here is the patch for src/config.in:

ChangeLog entry for src/ChangeLog:
2003-06-25  Vin Shelton  <acs@xemacs.org>

	* config.in: Add definition for
	XRegisterIMInstantiateCallback_arg6.


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. */
 #undef HAVE_XKBGETKEYBOARD
 
+/* 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
 

Regards,
  Vin Shelton

             reply	other threads:[~2003-06-26  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-26  4:00 Vin Shelton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-06-27  8:55 Build failure in xterm.c Jan D.
2003-06-27  9:26 ` Andreas Schwab
2003-06-27 11:44   ` Jan D.
2003-06-28  4:03 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2k7b94heh.fsf@zion.rcn.com \
    --to=acs@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.