From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id 3A2EC3860C3C; Sat, 28 May 2022 15:42:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A2EC3860C3C Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Takashi Yano To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin/cygwin-3_3-branch] Cygwin: cygheap: Fix the issue of cygwin1.dll in the root directory. X-Act-Checkin: newlib-cygwin X-Git-Author: Takashi Yano X-Git-Refname: refs/heads/cygwin-3_3-branch X-Git-Oldrev: 807318b6eeb127b8e62d9a170aa61639bb8571b4 X-Git-Newrev: dda2f89eb4eb74215085084e1f3ae8d4ad850d6d Message-Id: <20220528154230.3A2EC3860C3C@sourceware.org> Date: Sat, 28 May 2022 15:42:30 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2022 15:42:30 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Ddda2f89eb4e= b74215085084e1f3ae8d4ad850d6d commit dda2f89eb4eb74215085084e1f3ae8d4ad850d6d Author: Takashi Yano Date: Fri May 27 21:54:36 2022 +0900 Cygwin: cygheap: Fix the issue of cygwin1.dll in the root directory. =20 - After the commit 6d898f43, cygwin fails to start if cygwin1.dll is placed in the root directory. This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2022-May/251548.html Diff: --- winsup/cygwin/cygheap.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 01b49468e..79300a31d 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -183,6 +183,11 @@ init_cygheap::init_installation_root () if (p) p =3D wcschr (p + 1, L'\\'); /* Skip share name */ } + else /* Long path prefix followed by drive letter path */ + { + len =3D 4; + p +=3D 4; + } } installation_root_buf[1] =3D L'?'; RtlInitEmptyUnicodeString (&installation_key, installation_key_buf,