From: Iain Buclaw Date: Tue, 12 Mar 2019 16:31:48 +0000 (+0000) Subject: Use libiberty's lrealpath to avoid portability problems. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8451f4a52e71cf93d20313fb067efb14894d1cc9;p=gcc.git Use libiberty's lrealpath to avoid portability problems. The dmd front-end function FileName::canonicalName could be called during the semantic pass of import("file") expressions, so still requires that realpath() be redefined. Initial patch by Rainer Orth. gcc/d/ChangeLog: 2019-03-12 Iain Buclaw PR d/87866 * d-system.h (realpath): Redefine as lrealpath. From-SVN: r269619 --- diff --git a/gcc/d/ChangeLog b/gcc/d/ChangeLog index c91a05079b7..6c96ec4bf5b 100644 --- a/gcc/d/ChangeLog +++ b/gcc/d/ChangeLog @@ -1,3 +1,8 @@ +2019-03-12 Iain Buclaw + + PR d/87866 + * d-system.h (realpath): Redefine as lrealpath. + 2019-03-12 Iain Buclaw * d-lang.cc (d_init_options): Set global.params.cplusplus to C++14. 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)