From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8156 invoked by alias); 23 Aug 2012 15:26:35 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30640 Received: (qmail 18030 invoked from network); 23 Aug 2012 15:26:33 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at spf01.biglobe.ne.jp designates 133.205.19.69 as permitted sender) X-Biglobe-Sender: From: "Jun T." Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Re: wcwidth autoconf bug Message-Id: Date: Thu, 23 Aug 2012 23:43:33 +0900 To: zsh-workers@zsh.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1485\)) X-Mailer: Apple Mail (2.1485) 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 */ =20 /**/ -#if defined(BROKEN_WCWIDTH) && defined(__STDC_ISO_10646__) +#if defined(BROKEN_WCWIDTH) && (defined(__STDC_ISO_10646__) || = defined(__APPLE__)) =20 /* * This is an implementation of wcwidth() and wcswidth() (defined in @@ -949,5 +949,5 @@ #endif /* 0 */ =20 /**/ -#endif /* BROKEN_WCWIDTH && __STDC_ISO_10646__ */ +#endif /* BROKEN_WCWIDTH && (__STDC_ISO_10646__ || __APPLE__) */ =20 Index: Src/zsh.h =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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) =20 -#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)