public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin/main] Cygwin: glob: convert internal character datatype to wint_t
Date: Mon, 20 Feb 2023 22:01:09 +0000 (GMT)	[thread overview]
Message-ID: <20230220220109.1830A3858C2F@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=244faaea8e24c70a1d61b939623364e3bdfaa28c

commit 244faaea8e24c70a1d61b939623364e3bdfaa28c
Author:     Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Mon Feb 20 22:47:17 2023 +0100
Commit:     Corinna Vinschen <corinna@vinschen.de>
CommitDate: Mon Feb 20 22:47:17 2023 +0100

    Cygwin: glob: convert internal character datatype to wint_t
    
    uint_fast64_t doesn't allow easy string handling, so convert
    the internal "Char" type to wint_t.  Given that UTF-32 only
    needs 21 bits, we're well off with 28 usable character bits.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/glob.cc | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/winsup/cygwin/glob.cc b/winsup/cygwin/glob.cc
index b84c36fccdac..4ef947929a58 100644
--- a/winsup/cygwin/glob.cc
+++ b/winsup/cygwin/glob.cc
@@ -130,12 +130,13 @@ __FBSDID("$FreeBSD: src/lib/libc/gen/glob.c,v 1.28 2010/05/12 17:44:00 gordon Ex
 
 #ifndef DEBUG
 
-#define	M_QUOTE		0x8000000000ULL
-#define	M_PROTECT	0x4000000000ULL
-#define	M_MASK		0xffffffffffULL
-#define	M_CHAR		0x00ffffffffULL
+#define	M_QUOTE		0x40000000U
+#define	M_PROTECT	0x20000000U
+#define	M_MASK		0x70ffffffU
+#define	M_COLL_MASK	0x700000ffU
+#define	M_CHAR		0x0fffffffU
 
-typedef uint_fast64_t Char;
+typedef wint_t Char;
 
 #else

                 reply	other threads:[~2023-02-20 22:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230220220109.1830A3858C2F@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).