aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/unicode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libbb/unicode.c b/libbb/unicode.c
index 22e45878a..acc7cd8df 100644
--- a/libbb/unicode.c
+++ b/libbb/unicode.c
@@ -276,8 +276,9 @@ int FAST_FUNC iswpunct(wint_t wc)
276 return (unsigned)wc <= 0x7f && ispunct(wc); 276 return (unsigned)wc <= 0x7f && ispunct(wc);
277} 277}
278 278
279# if !ENABLE_PLATFORM_MINGW32 || CONFIG_LAST_SUPPORTED_WCHAR < 0x30000 279#define WCWIDTH_ALT (ENABLE_PLATFORM_MINGW32 && CONFIG_LAST_SUPPORTED_WCHAR >= 0x30000)
280 280
281# if !WCWIDTH_ALT || ENABLE_UNICODE_BIDI_SUPPORT
281# if CONFIG_LAST_SUPPORTED_WCHAR >= 0x300 282# if CONFIG_LAST_SUPPORTED_WCHAR >= 0x300
282struct interval { 283struct interval {
283 uint16_t first; 284 uint16_t first;
@@ -334,7 +335,9 @@ static int in_uint16_table(unsigned ucs, const uint16_t *table, unsigned max)
334 return 0; 335 return 0;
335} 336}
336# endif 337# endif
338# endif /* !WCWIDTH_ALT || ENABLE_UNICODE_BIDI_SUPPORT */
337 339
340# if !WCWIDTH_ALT
338 341
339/* 342/*
340 * This is an implementation of wcwidth() and wcswidth() (defined in 343 * This is an implementation of wcwidth() and wcswidth() (defined in
@@ -704,7 +707,7 @@ int FAST_FUNC wcwidth(unsigned ucs)
704# endif /* >= 0x300 */ 707# endif /* >= 0x300 */
705} 708}
706 709
707# else /* ENABLE_PLATFORM_MINGW32 && CONFIG_LAST_SUPPORTED_WCHAR >= 0x30000 */ 710# else /* WCWIDTH_ALT */
708# include "wcwidth_alt.c" /* simpler and more up-to-date implementation */ 711# include "wcwidth_alt.c" /* simpler and more up-to-date implementation */
709# endif 712# endif
710 713