zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun T." <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: wcwidth autoconf bug
Date: Thu, 23 Aug 2012 23:43:33 +0900	[thread overview]
Message-ID: <E1FBC880-3CCC-415D-9F61-12576AF78FDC@kba.biglobe.ne.jp> (raw)

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)




             reply	other threads:[~2012-08-23 15:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-23 14:43 Jun T. [this message]
  -- 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

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=E1FBC880-3CCC-415D-9F61-12576AF78FDC@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.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 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).