public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] gdc 9, 10 and 11 bug fix
@ 2022-05-12 20:29 Marc Aurèle La France
  2022-05-15 13:04 ` Iain Buclaw
  0 siblings, 1 reply; 10+ messages in thread
From: Marc Aurèle La France @ 2022-05-12 20:29 UTC (permalink / raw)
  To: gcc-patches

Greetings.

No compiler has any business rejecting files for the sole crime of being
symlinked to.  The following applies, modulo patch fuzz, to the 9, 10 and 11
series of compilers.

Given my use of shadow trees, this bug attempted to prevent me from building
12.1.0.  The D-based gdc in 12.1.0 and up does not exhibit this quirky
behaviour.

Please Reply-To-All.

Thanks and have a great day.

Marc.

Signed-off-by: Marc Aurèle La France <tsi@tuyoix.net>

diff -aNpRruz -X /etc/diff.excludes gcc-11.3.0/gcc/d/dmd/root/filename.c devel-11.3.0/gcc/d/dmd/root/filename.c
--- gcc-11.3.0/gcc/d/dmd/root/filename.c	2022-04-21 01:58:53.151586473 -0600
+++ devel-11.3.0/gcc/d/dmd/root/filename.c	2022-05-11 16:30:54.398488793 -0600
@@ -522,7 +522,7 @@ const char *FileName::safeSearchPath(Strings *path, const char *name)
             //      "strncmp(cpath, cname, %i)=%i\n", exists(cname),
             //      strlen(cpath), strncmp(cpath, cname, strlen(cpath)));
             // exists and name is *really* a "child" of path
-            if (exists(cname) && strncmp(cpath, cname, strlen(cpath)) == 0)
+            if (exists(cname))
             {
                 ::free(const_cast<char *>(cpath));
                 const char *p = mem.xstrdup(cname);

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-22  0:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 20:29 [PATCH] gdc 9, 10 and 11 bug fix Marc Aurèle La France
2022-05-15 13:04 ` Iain Buclaw
2022-05-16 21:34   ` Marc Aurèle La France
2022-05-17 11:14     ` Iain Buclaw
2022-05-17 15:31       ` Marc Aurèle La France
2022-05-17 16:14         ` Iain Buclaw
2022-05-17 16:33           ` Marc Aurèle La France
2022-05-20  4:56             ` Marc Aurèle La France
2022-05-20 13:01               ` Iain Buclaw
2022-05-22  0:05                 ` Marc Aurèle La France

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).