[BRLTTY] brltty 3.7.1 compile errors

Samuel Thibault samuel.thibault at ens-lyon.org
Thu Dec 15 11:05:37 EST 2005


Hi,

Andor Demarteau, le Thu 15 Dec 2005 16:08:36 +0100, a écrit :
> see the included tyepscript output in attachemnt.
> for soem reason it doesn't compile.

Mmm, XKBlib.h includes XKBstr.h, but your distribution seems to miss the
corresponding dependency... This is a distribution bug, please install
package libxkbfile-dev or even libx11-dev.

That said, we indeed need XkbUseCoreKbd which is provided by the XKB
extension. So Dave, here is a patch to correct this.

Regards,
Samuel

Index: Programs/xbrlapi.c
===================================================================
--- Programs/xbrlapi.c	(révision 2089)
+++ Programs/xbrlapi.c	(copie de travail)
@@ -45,11 +45,11 @@
 #include <X11/XKBlib.h>
 #include <X11/keysym.h>
 
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
+#if defined(HAVE_X11_EXTENSIONS_XTEST_H) && defined(HAVE_X11_EXTENSIONS_XKB_H)
 #include <X11/extensions/XTest.h>
-#else /* HAVE_X11_EXTENSIONS_XTEST_H */
+#else /* HAVE_X11_EXTENSIONS_XTEST_H && HAVE_X11_EXTENSIONS_XKB_H */
 #warning <X11/extensions/XTest.h> not available: keypress simulation not supported
-#endif /* HAVE_X11_EXTENSIONS_XTEST_H */
+#endif /* HAVE_X11_EXTENSIONS_XTEST_H && HAVE_X11_EXTENSIONS_XKB_H */
 
 #include "api.h"
 #include "brldefs.h"
@@ -165,12 +165,12 @@
   }
   if (brlapi_ignoreKeyRange(0,BRL_KEYCODE_MAX)<0)
     fatal_brlapi_errno("ignoreKeys",gettext("cannot ignore keys on tty %d\n"),vtno);
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
+#if defined(HAVE_X11_EXTENSIONS_XTEST_H) && defined(HAVE_X11_EXTENSIONS_XKB_H)
   if (brlapi_unignoreKeyRange(BRL_BLK_PASSCHAR,BRL_BLK_PASSCHAR|BRL_MSK_ARG))
     fatal_brlapi_errno("unignoreKeyRange",NULL);
   if (brlapi_unignoreKeyRange(BRL_BLK_PASSKEY, BRL_BLK_PASSKEY |BRL_MSK_ARG))
     fatal_brlapi_errno("unignoreKeyRange",NULL);
-#endif /* HAVE_X11_EXTENSIONS_XTEST_H */
+#endif /* HAVE_X11_EXTENSIONS_XTEST_H && HAVE_X11_EXTENSIONS_XKB_H */
 }
 
 void api_setName(const char *wm_name) {
@@ -385,13 +385,13 @@
   int X_fd;
   fd_set fds,readfds;
   int maxfd;
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
+#if defined(HAVE_X11_EXTENSIONS_XTEST_H) && defined(HAVE_X11_EXTENSIONS_XKB_H)
   int res;
   brl_keycode_t code;
   unsigned int keysym, keycode, modifiers;
   Bool haveXTest;
   int eventBase, errorBase, majorVersion, minorVersion;
-#endif /* HAVE_X11_EXTENSIONS_XTEST_H */
+#endif /* HAVE_X11_EXTENSIONS_XTEST_H && HAVE_X11_EXTENSIONS_XKB_H */
 
   Xdisplay = display;
   if (!Xdisplay) Xdisplay=getenv("DISPLAY");
@@ -399,9 +399,9 @@
 
   if (!XSetErrorHandler(ErrorHandler)) fatal(gettext("strange old error handler\n"));
 
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
+#if defined(HAVE_X11_EXTENSIONS_XTEST_H) && defined(HAVE_X11_EXTENSIONS_XKB_H)
   haveXTest = XTestQueryExtension(dpy, &eventBase, &errorBase, &majorVersion, &minorVersion);
-#endif /* HAVE_X11_EXTENSIONS_XTEST_H */
+#endif /* HAVE_X11_EXTENSIONS_XTEST_H && HAVE_X11_EXTENSIONS_XKB_H */
 
   X_fd = XConnectionNumber(dpy);
   FD_ZERO(&fds);
@@ -512,7 +512,7 @@
       default: fprintf(stderr,gettext("unhandled event type: %d\n"),ev.type); break;
       }
     }
-#ifdef HAVE_X11_EXTENSIONS_XTEST_H
+#if defined(HAVE_X11_EXTENSIONS_XTEST_H) && defined(HAVE_X11_EXTENSIONS_XKB_H)
     if (haveXTest && FD_ISSET(brlapi_fd,&readfds)) {
       while ((res = brlapi_readKey(0, &code)==1)) {
 	modifiers = 0;
@@ -601,7 +601,7 @@
       if (res<0)
 	fatal_brlapi_errno("brlapi_readKey",NULL);
     }
-#endif /* HAVE_X11_EXTENSIONS_XTEST_H */
+#endif /* HAVE_X11_EXTENSIONS_XTEST_H && HAVE_X11_EXTENSIONS_XKB_H */
   }
 }
 
Index: configure.in
===================================================================
--- configure.in	(révision 2089)
+++ configure.in	(copie de travail)
@@ -471,6 +471,7 @@
          AC_HAVE_LIBRARY([Xtst], [
             LIBS="-lXtst ${LIBS}"
             AC_CHECK_HEADERS([X11/extensions/XTest.h])
+            AC_CHECK_HEADERS([X11/extensions/XKB.h])
          ])
       ])
 
Index: config.h.in
===================================================================
--- config.h.in	(révision 2089)
+++ config.h.in	(copie de travail)
@@ -325,6 +325,9 @@
 /* Define this if the header file X11/extensions/XTest.h exists. */
 #undef HAVE_X11_EXTENSIONS_XTEST_H
 
+/* Define this if the header file X11/extensions/XKB.h exists. */
+#undef HAVE_X11_EXTENSIONS_XKB_H
+
 /* Define only one of the following curses packages. */
 #undef HAVE_PKG_CURSES
 #undef HAVE_PKG_NCURSES


----- End forwarded message -----

-- 
Samuel Thibault <samuel.thibault at ens-lyon.org>
After watching my newly-retired dad spend two weeks learning how to make a new
folder, it became obvious that "intuitive" mostly means "what the writer or
speaker of intuitive likes".
(Bruce Ediger, bediger at teal.csn.org, in comp.os.linux.misc, on X the
intuitiveness of a Mac interface.)


More information about the BRLTTY mailing list