zsh-workers
 help / color / mirror / code / Atom feed
* Re: wcwidth autoconf bug
@ 2012-08-23 14:43 Jun T.
  0 siblings, 0 replies; 6+ messages in thread
From: Jun T. @ 2012-08-23 14:43 UTC (permalink / raw)
  To: zsh-workers

On Mac OS X, wcwidth() is broken but __STDC_ISO_10646__ is NOT defined.

(I guess 'if defined(__APPLE__) && defined(BROKEN_WCWIDTH)' would
be enough, but just in case...)


Index: Src/compat.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/compat.c,v
retrieving revision 1.22
diff -u -r1.22 compat.c
--- Src/compat.c	7 Aug 2012 18:29:03 -0000	1.22
+++ Src/compat.c	23 Aug 2012 13:37:29 -0000
@@ -630,7 +630,7 @@
 #endif /* HAVE_STRTOUL */
 
 /**/
-#if defined(BROKEN_WCWIDTH) && defined(__STDC_ISO_10646__)
+#if defined(BROKEN_WCWIDTH) && (defined(__STDC_ISO_10646__) || defined(__APPLE__))
 
 /*
  * This is an implementation of wcwidth() and wcswidth() (defined in
@@ -949,5 +949,5 @@
 #endif /* 0 */
 
 /**/
-#endif /* BROKEN_WCWIDTH && __STDC_ISO_10646__ */
+#endif /* BROKEN_WCWIDTH && (__STDC_ISO_10646__ || __APPLE__) */
 
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.183
diff -u -r1.183 zsh.h
--- Src/zsh.h	21 Aug 2012 18:03:03 -0000	1.183
+++ Src/zsh.h	23 Aug 2012 13:37:30 -0000
@@ -2681,7 +2681,7 @@
 #define MB_METASTRWIDTH(str)	mb_metastrlen(str, 1)
 #define MB_METASTRLEN2(str, widthp)	mb_metastrlen(str, widthp)
 
-#if defined(BROKEN_WCWIDTH) && defined(__STDC_ISO_10646__)
+#if defined(BROKEN_WCWIDTH) && (defined(__STDC_ISO_10646__) || defined(__APPLE__))
 #define WCWIDTH(wc)	mk_wcwidth(wc)
 #else
 #define WCWIDTH(wc)	wcwidth(wc)




^ permalink raw reply	[flat|nested] 6+ messages in thread
* wcwidth autoconf bug
@ 2012-07-25  9:03 YAMAMOTO Takashi
  2012-07-28 20:06 ` Peter Stephenson
  2012-08-06  6:32 ` YAMAMOTO Takashi
  0 siblings, 2 replies; 6+ messages in thread
From: YAMAMOTO Takashi @ 2012-07-25  9:03 UTC (permalink / raw)
  To: zsh-workers

hi,

the conditional broken_wcwidth seems inverted.

YAMAMOTO Takashi

diff --git a/configure.ac b/configure.ac
index 6c04597..972a8e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2530,8 +2530,8 @@ if test x$zsh_cv_c_unicode_support = xyes; then
   AC_CACHE_CHECK(if the wcwidth() function is broken,
   zsh_cv_c_broken_wcwidth,
   [AC_TRY_RUN([$locale_prog],
-  zsh_cv_c_broken_wcwidth=yes,
   zsh_cv_c_broken_wcwidth=no,
+  zsh_cv_c_broken_wcwidth=yes,
   zsh_cv_c_broken_wcwidth=no)])
   if test x$zsh_cv_c_broken_wcwidth = xyes; then
     AC_DEFINE(BROKEN_WCWIDTH)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-08-23 15:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-23 14:43 wcwidth autoconf bug Jun T.
  -- strict thread matches above, loose matches on Subject: below --
2012-07-25  9:03 YAMAMOTO Takashi
2012-07-28 20:06 ` Peter Stephenson
2012-08-06  6:32 ` YAMAMOTO Takashi
2012-08-07  3:12   ` YAMAMOTO Takashi
2012-08-07 18:38     ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).