Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Oct 2023 21:37:30 GMT
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 6d3296f16a06 - main - teken: use __bitcount() instead of bitcount()
Message-ID:  <202310072137.397LbUCU007722@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by christos:

URL: https://cgit.FreeBSD.org/src/commit/?id=6d3296f16a06bcaa49918799e683936711dcf9c9

commit 6d3296f16a06bcaa49918799e683936711dcf9c9
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2023-10-07 21:36:59 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2023-10-07 21:36:59 +0000

    teken: use __bitcount() instead of bitcount()
    
    The use of bitcount() triggered a build error because it couldn't be
    located. __bitcount() on the other hand is defined in sys/types.h, which
    is included in teken/teken.h.
    
    MFC after:      2 weeks
---
 sys/teken/teken_wcwidth.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h
index f5a23dbc9679..bc992e1ef5d8 100644
--- a/sys/teken/teken_wcwidth.h
+++ b/sys/teken/teken_wcwidth.h
@@ -129,7 +129,7 @@ teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes)
 {
 
   /* Check for malformed characters. */
-  if (bitcount(bytes[0] & 0xf0) != nbytes)
+  if (__bitcount(bytes[0] & 0xf0) != nbytes)
     return (TEKEN_UTF8_INVALID_CODEPOINT);
 
   switch (nbytes) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202310072137.397LbUCU007722>