[BRLTTY] convertCharToWchar and reverse not found

Samuel Thibault samuel.thibault at ens-lyon.org
Tue Feb 20 15:55:32 EST 2007


Hi,

rmgls at wanadoo.fr, le Sat 17 Feb 2007 09:46:32 +0100, a écrit :
> cmd.o(.text+0x65e): In function `cmdBrlttyToBrlapi':
> ./cmd.c:222: undefined reference to `convertCharToWchar'
> cmd.o(.text+0x995): In function `cmdBrlapiToBrltty':
> ./cmd.c:311: undefined reference to `convertWcharToChar'
> brlapi_server.o(.text+0x887): In function `getDots':
> ./brlapi_server.c:584: undefined reference to `convertWcharToChar'

Oops, two issues here:
- configure doesn't seem to find iconv() on your system
- we don't handle that case properly.

For the second issue, attached is a patch that assumes latin1 encoding.

For the first issue, that's odd. Could you send us your config.log file?

> Does it miss an extern decl: (from charset.c?

No: declarations don't really matter (though they may introduce runtime
bugs). Definitions matter.

Samuel
-------------- next part --------------
Index: Programs/charset.c
===================================================================
--- Programs/charset.c	(r?vision 2902)
+++ Programs/charset.c	(copie de travail)
@@ -175,6 +175,17 @@
   if (wc == WEOF) return EOF;
   return convertWcharToChar(wc);
 }
+#else /* !HAVE_ICONV_H && !WINDOWS */
+/* Assume latin1 encoding */
+wint_t convertCharToWchar (char c) {
+  return c;
+}
+int convertWcharToChar (wchar_t wc) {
+  if (wc < 0x100)
+    return wc;
+  else
+    return EOF;
+}
 #endif /* conversions */
 
 static const char *


More information about the BRLTTY mailing list