[newlib-cygwin] Cygwin: cygheap: Fix the issue of cygwin1.dll in the root directory.

Takashi Yano tyan0@sourceware.org
Sat May 28 15:42:45 GMT 2022


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

commit 871ca7ba64694e2a3c62d144e2d760bab3dd4a64
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Fri May 27 21:54:36 2022 +0900

    Cygwin: cygheap: Fix the issue of cygwin1.dll in the root directory.
    
    - 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 = wcschr (p + 1, L'\\');  /* Skip share name */
 	}
+      else /* Long path prefix followed by drive letter path */
+	{
+	  len = 4;
+	  p += 4;
+	}
     }
   installation_root_buf[1] = L'?';
   RtlInitEmptyUnicodeString (&installation_key, installation_key_buf,


More information about the Cygwin-cvs mailing list