From 85a698b8ec0c68ce6bf130dbe909ca5ff129c6d9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 7 Aug 2012 18:29:02 +0000 Subject: YAMAMOTO Takashi: 30599: don't use replacement wcwidth if not ISO-10646 --- Src/compat.c | 4 ++-- Src/zsh.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Src') diff --git a/Src/compat.c b/Src/compat.c index e36de3219..6d08dab94 100644 --- a/Src/compat.c +++ b/Src/compat.c @@ -630,7 +630,7 @@ strtoul(nptr, endptr, base) #endif /* HAVE_STRTOUL */ /**/ -#ifdef BROKEN_WCWIDTH +#if defined(BROKEN_WCWIDTH) && defined(__STDC_ISO_10646__) /* * This is an implementation of wcwidth() and wcswidth() (defined in @@ -949,5 +949,5 @@ int mk_wcswidth_cjk(const wchar_t *pwcs, size_t n) #endif /* 0 */ /**/ -#endif /* BROKEN_WCWIDTH */ +#endif /* BROKEN_WCWIDTH && __STDC_ISO_10646__ */ diff --git a/Src/zsh.h b/Src/zsh.h index cc3a67008..afe22f059 100644 --- a/Src/zsh.h +++ b/Src/zsh.h @@ -2678,7 +2678,7 @@ typedef wint_t convchar_t; #define MB_METASTRWIDTH(str) mb_metastrlen(str, 1) #define MB_METASTRLEN2(str, widthp) mb_metastrlen(str, widthp) -#ifdef BROKEN_WCWIDTH +#if defined(BROKEN_WCWIDTH) && defined(__STDC_ISO_10646__) #define WCWIDTH(wc) mk_wcwidth(wc) #else #define WCWIDTH(wc) wcwidth(wc) -- cgit 1.4.1