From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7868) id 4ED66385041B; Sat, 28 May 2022 15:42:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4ED66385041B 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: 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/master X-Git-Oldrev: e93bb6f9852a9dbfe21bd0ffbea1751a5d9cfd60 X-Git-Newrev: 871ca7ba64694e2a3c62d144e2d760bab3dd4a64 Message-Id: <20220528154245.4ED66385041B@sourceware.org> Date: Sat, 28 May 2022 15:42:45 +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:45 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D871ca7ba646= 94e2a3c62d144e2d760bab3dd4a64 commit 871ca7ba64694e2a3c62d144e2d760bab3dd4a64 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 1be7f0c32..b72bc5a08 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,