This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]