Re: [PATCH] wchar.h: tweak wcwidth prototype parameter wchar_t -> wint_t

Brian Inglis <[email protected]> Sat, 30 May 2026 21:50:08 -0600
Newsgroups gmane.comp.lib.newlib,gmane.os.cygwin
Organization Systematic Software
Message-ID <[email protected]>
On 2026-05-28 22:58, Thomas Wolff wrote:
> to make it compliant with newlib and the manual page;
> fixes cases of wrong width calculation:
> https://cygwin.com/pipermail/cygwin/2026-April/259597.html
> as mentioned in
> https://cygwin.com/pipermail/cygwin/2026-May/259734.html
> as described in
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125451#c14
 > attachment: 0001-wchar.h-tweak-wcwidth-prototype-parameter-wchar_t-wi.patch

The existing wcwidth declaration in newlib/libc/include/wchar.h agrees with
POSIX 8 SUS V5.

It is the man doc, definition, and implementation in
newlib/libc/string/wcwidth.c which need changed to match the specification and 
return codes in:

	https://pubs.opengroup.org/onlinepubs/9799919799/functions/wcwidth.html

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry