Re: [RFC] Some sr.ht CI tweaking

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <aY1jEs2kNU6bpi9A@qinghai>
On Thu, Feb 12, 2026 at 11:46:00AM +0800, Kevin J. McCarthy wrote:
>On Wed, Feb 11, 2026 at 06:21:12PM +0100, Rene Kita wrote:
>>commit 9b4284ade52b786e665c2daf8a784588a580a127
>>Author: Rene Kita <[email protected]>
>>Date:   2026-02-04T10:02:29+01:00
>>
>>   Fix build error for --without-wc-funcs on FreeBSD
>>
>>   mbyte.c:417:5: error: redefinition of '__wcwidth'
>>   417 | int wcwidth (wchar_t wc)
>
>Let me take another look at this.  I haven't studied this area much, 
>so I'd like to understand how mutt even compiles if wchar.h is 
>missing.
>
>I wish the folks who had written all this stuff were still active... :-(

I'm poking around a bit more, and I have a few questions that maybe 
someone on the list can clarify for me.

So, there are some functions defined in wctype.h and some in wchar.h.

In mutt.h we have:
#ifdef HAVE_WCHAR_H
# include <wchar.h>
#endif
#if defined(HAVE_WCTYPE_H) && defined(HAVE_WC_FUNCS)
# include <wctype.h>
#endif

So when mutt is configured --without-wc-funcs, mutt will not include 
wctype.h even if it exists.  However, wchar.h will be included 
regardless if it exists.

In mbyte.c, however, we have a whole block of functions that are defined 
inside #ifndef HAVE_WC_FUNCS.  Some of which are declared in wctype.h, 
but some of which are delcared in wchar.h.

The ones in wchar.h include wcrtomb(), mbrtowc(), and wcwidth().

So, in this case, why are we only getting in trouble with wcwidth(), but
not the first two?

If we're configuring --without-wc-funcs, do we really want to use the 
system version of wcwidth() even if wchar.h exists?

Thanks to anyone who can help.  I've never delved into the intricacies 
of dealing with wchar.h and wctype.h and find the whole thing, combined 
with --without-wc-funcs, a bit confusing.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmmNYxIACgkQre92hIAx
a9q8cxAAjLxHtP0CZh94W9o3X4S7+UrOG6kQaH9Q2EiuFAsD6KNAjqzu9NxUQPFt
u/LLa6AGxOT1ZIRU2rM9hyjAAFya4cO4Jf5lSWmNK3pQdNx7k4oJ7CCw1AFKEc4Z
+q2Cu+JJOyozCbRegmLms9fccXwKbmmqJt39reRnej7ljpT3Cn+YATem/W1n1rY0
nkvkQXVBxEfvh/wizpWPNkQ/3Q67zY7SmTuAktDeKwPbkhwiLP2KSXbU3Od0s6K7
0eT/8x4YqQSU3z/drPyAGW12KPYMk87YtevEXEhfzZ1zx0OhDNm8cpdIYb9gyp7R
cbjeGFKH1NH641cxUlQ8TS+KO0rqzQ4aCB26mmx7vi4DDCeOQdeTCq67BRxmyRhC
JO1gvk8GRnfLmb8F7l4gTlzUpHgTQw1dZMvc0gDWZS9JW+JEZAJmvlIbdyfEsWV3
MxNjllcB71HN8YD5RHvV1KGCNHdjMPa5dnv9HiDa2Dgt5zd5/R69ZFhb/1KErT2B
AjSGe6A8mhMA57/Ajk+xPIePwGg5uINtGwFAhitpNMplqMWcgs99ooOJM60oAKlV
5M68Eqr9Wxi5McxnHx0B8jZb+vBpjlRXFU9rmf2rJdT5o/zyLrPKnFwFqBaIE/yI
4h4ZyWuBLR49HpKq5byVozG8FKPRTzoAK6WF0VMH2I7P2xuE0xM=
=+dtb
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.