This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, PR d/87866] Committed redefine realpath as lrealpath in dmd front-end
- From: Iain Buclaw <ibuclaw at gdcproject dot org>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Date: Tue, 12 Mar 2019 17:32:12 +0100
- Subject: [PATCH, PR d/87866] Committed redefine realpath as lrealpath in dmd front-end
Hi,
This patch is a second fix for PR d/87866, as dmd front-end function
FileName::canonicalName could be called during the semantic pass of
import("file") expressions, so still requires that realpath() be
redefined.
Bootstrapped and ran D2 testsuite on x86_64-linux-gnu.
Committed to trunk as r269619.
--
Iain
---
gcc/d/ChangeLog:
2019-03-12 Iain Buclaw <ibuclaw@gdcproject.org>
PR d/87866
* d-system.h (realpath): Redefine as lrealpath.
---
diff --git a/gcc/d/d-system.h b/gcc/d/d-system.h
index c32825d4ad1..efece15f3bc 100644
--- a/gcc/d/d-system.h
+++ b/gcc/d/d-system.h
@@ -31,6 +31,10 @@
#undef assert
#define assert(EXPR) gcc_assert(EXPR)
+/* Use libiberty's lrealpath to avoid portability problems. */
+#undef realpath
+#define realpath(a, b) lrealpath((a))
+
/* Forward ctype.h macros used by the dmd front-end to safe-ctype.h. */
#undef isalpha
#define isalpha(c) ISALPHA(c)