From: Bruno Haible Date: Thu, 21 Jan 2016 10:32:20 +0000 (+0100) Subject: wcwidth: Replace also on OpenBSD 5.8 X-Git-Tag: v1.0~6835 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=485f1270a8a61a0ba61f1f9a04a763d6060c92ab;p=gnulib.git wcwidth: Replace also on OpenBSD 5.8 * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A). * doc/posix-functions/wcwidth.texi: Update. --- diff --git a/ChangeLog b/ChangeLog index 1bdf766eac..f008301254 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-01-21 Bruno Haible + + wcwidth: Replace also on OpenBSD 5.8 + * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Check the value of wcwidth(0xFF1A). + * doc/posix-functions/wcwidth.texi: Update. + 2016-01-20 Pádraig Brady gnu-web-doc-update: fix addition of new files diff --git a/doc/posix-functions/wcwidth.texi b/doc/posix-functions/wcwidth.texi index d00354b0e3..d15bbb0416 100644 --- a/doc/posix-functions/wcwidth.texi +++ b/doc/posix-functions/wcwidth.texi @@ -17,7 +17,7 @@ glibc 2.8. @item This function handles combining characters in UTF-8 locales incorrectly on some platforms: -Mac OS X 10.3, OpenBSD 5.0. +Mac OS X 10.3, OpenBSD 5.8. @end itemize Portability problems not fixed by Gnulib: diff --git a/m4/wcwidth.m4 b/m4/wcwidth.m4 index 653f4427b6..7a743c0aa7 100644 --- a/m4/wcwidth.m4 +++ b/m4/wcwidth.m4 @@ -39,6 +39,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH], dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1. dnl On OpenBSD 5.0, wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1. dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1. + dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0. dnl This leads to bugs in 'ls' (coreutils). AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales], [gl_cv_func_wcwidth_works], @@ -74,6 +75,8 @@ int main () result |= 2; if (wcwidth (0x200B) > 0) result |= 4; + if (wcwidth (0xFF1A) == 0) + result |= 8; } return result; }]])],