From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 1830A3858C2F; Mon, 20 Feb 2023 22:01:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1830A3858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676930469; bh=Mq0ZZoxDM7ThbuuBd+AkiEbkASuLS0S4JFGCYNvOTIs=; h=From:To:Subject:Date:From; b=KewGU+xyjloaf7AqG+BJDqqzSh1iKKmoHI2bhLEzETJ0ohUDbMNazE2JPYVTfwjfu ai7EHLwdIPNUtZj8yToCoTGVZJcKNgZNpFukqVRzokl2FlSgvmlLQpes4o/qG4u14c 9LcKDnz0j3s9My+6OnyOQxiFxLdba8MdkPK6fGlc= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/main] Cygwin: glob: convert internal character datatype to wint_t X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 1eadb2388737d5411941be3fef07bec8a148cd42 X-Git-Newrev: 244faaea8e24c70a1d61b939623364e3bdfaa28c Message-Id: <20230220220109.1830A3858C2F@sourceware.org> Date: Mon, 20 Feb 2023 22:01:09 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D244faaea8e2= 4c70a1d61b939623364e3bdfaa28c commit 244faaea8e24c70a1d61b939623364e3bdfaa28c Author: Corinna Vinschen AuthorDate: Mon Feb 20 22:47:17 2023 +0100 Commit: Corinna Vinschen CommitDate: Mon Feb 20 22:47:17 2023 +0100 Cygwin: glob: convert internal character datatype to wint_t =20 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. =20 Signed-off-by: Corinna Vinschen 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 20= 10/05/12 17:44:00 gordon Ex =20 #ifndef DEBUG =20 -#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 =20 -typedef uint_fast64_t Char; +typedef wint_t Char; =20 #else