Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: multibyte configuration



This probes for wcswidth() and assumes the value 1 if the function isn't
available, which at least means the code compiles on OpenBSD with
--enable-multibyte, though it still didn't seem to work.

Danek Duvall tried out a simplified test for multibyte handling on
Solaris which wasn't working for me, but it was for him, so I still have
no clue what's happening there.  Any reports of working zsh with
--enable-multibyte (and real multibyte characters, I know that at least
it compiles and runs) on Solaris 8+ would be useful.

Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.46
diff -u -r1.46 configure.ac
--- configure.ac	9 Dec 2005 19:20:02 -0000	1.46
+++ configure.ac	6 Jan 2006 11:28:36 -0000
@@ -1121,7 +1121,7 @@
 	       pcre_compile pcre_study pcre_exec \
 	       nl_langinfo \
 	       erand48 open_memstream \
-	       wctomb mbrtowc wcrtomb iconv \
+	       wctomb mbrtowc wcrtomb wcswidth iconv \
 	       grantpt unlockpt ptsname \
 	       htons ntohs)
 AC_FUNC_STRCOLL
Index: Src/system.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/system.h,v
retrieving revision 1.36
diff -u -r1.36 system.h
--- Src/system.h	15 Dec 2005 14:51:41 -0000	1.36
+++ Src/system.h	6 Jan 2006 11:28:39 -0000
@@ -703,6 +703,10 @@
  */
 # include <wchar.h>
 # include <wctype.h>
+#ifndef HAVE_WCSWIDTH
+/* wcswidth is missing on OpenBSD: assume single-width characters */
+#define wcswidth(x, y)	(1)
+#endif
 #endif
 #ifdef HAVE_LANGINFO_H
 #  include <langinfo.h>


Your mail client is unable to display the latest news from CSR. To access our news copy this link into a web browser:  http://www.csr.com/email_sig.html



Messages sorted by: Reverse Date, Date, Thread, Author